:root {
  --bg: #1e1e1e;
  --sidebar-bg: #252526;
  --tab-active: #1e1e1e;
  --tab-inactive: #2d2d2d;
  --border: #3c3c3c;
  --text: #cccccc;
  --accent: #007acc;
  --comment: #6a9955;
  --keyword: #569cd6;
  --font-ui: 'Inter', sans-serif;
  --radius: 3px;
  --text-secondary: #999;
  --text-primary: #fff;
  --bg-active: #37373d;
  --text-muted: #888;
  --bg-elevated: #252526;
  --accent-dim: #007acc;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); height: 100vh; overflow: hidden; display: flex; flex-direction: column; }

/* Titlebar */
.titlebar { height: 30px; background: var(--sidebar-bg); display: flex; align-items: center; padding: 0 10px; border-bottom: 1px solid var(--border); font-size: 12px; user-select: none; }
.titlebar-dots { display: flex; gap: 6px; margin-right: 10px; }
.titlebar-dots span { width: 10px; height: 10px; border-radius: 50%; background: #444; }
.titlebar-label { color: #999; }
.sidebar-toggle { background: none; border: none; color: var(--text); cursor: pointer; margin-right: 10px; display: none; }

/* Workbench */
.workbench { display: flex; flex: 1; overflow: hidden; }

/* Sidebar */
.sidebar { width: 260px; background: var(--sidebar-bg); border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.sidebar-heading { padding: 10px 15px; font-size: 11px; text-transform: uppercase; color: #888; letter-spacing: 0.5px; }
.file-tree { list-style: none; flex: 1; }
.file-item, .folder-item { padding: 5px 15px; display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.file-item:hover { background: #2a2d2e; }
.file-item.active { background: #37373d; color: #fff; }
.file-item.indent { padding-left: 35px; }
.file-icon { width: 16px; height: 16px; }
.sidebar-footer { padding: 15px; display: flex; gap: 15px; border-top: 1px solid var(--border); }
.sidebar-footer a { color: #888; }
.sidebar-footer a:hover { color: #fff; }

/* Editor Area */
.editor-area { flex: 1; display: flex; flex-direction: column; min-width: 0; }

/* Tabbar */
.tabbar { display: flex; background: #252526; overflow-x: auto; }
.tab { padding: 8px 15px; font-size: 13px; display: flex; align-items: center; gap: 8px; cursor: pointer; border-right: 1px solid var(--border); background: var(--tab-inactive); color: #999; white-space: nowrap; }
.tab.active { background: var(--tab-active); color: #fff; border-top: 1px solid var(--accent); }
.tab-close { background: none; border: none; color: #999; cursor: pointer; font-size: 16px; padding: 0 2px; }
.tab-close:hover { color: #fff; }

/* Editor Pane */
.editor-pane { flex: 1; padding: 40px; overflow-y: auto; font-family: 'JetBrains Mono', monospace; line-height: 1.6; }
.editor-pane h1 { font-size: 2em; margin-bottom: 10px; }
.editor-pane h2 { font-size: 1.5em; margin: 20px 0 10px; }
.editor-pane p { margin-bottom: 15px; max-width: 700px; }
.doc-comment { color: var(--comment); }
.doc-accent { color: var(--accent); }
.doc-keyword { color: var(--keyword); }
.metric-row { display: flex; gap: 20px; margin: 20px 0; }
.metric-card { background: #252526; padding: 15px; border-radius: 4px; border: 1px solid var(--border); flex: 1; }
.metric-card .label { font-size: 12px; color: #888; margin-bottom: 5px; }
.metric-card .value { font-size: 18px; font-weight: 600; }
.skill-tag-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.skill-tag { background: #333; padding: 4px 10px; border-radius: 3px; font-size: 13px; }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 15px; margin: 20px 0; }
.flip-card { perspective: 1000px; height: 210px; cursor: pointer; }
.flip-inner { position: relative; width: 100%; height: 100%; text-align: center; transition: transform 0.6s; transform-style: preserve-3d; }
.flip-card.flipped .flip-inner { transform: rotateY(180deg); }
.flip-face { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--border); background: #252526; padding: 10px; overflow-y: auto; }
.flip-back { transform: rotateY(180deg); background: #2d2d2d; font-size: 12px; line-height: 1.5; }
.flip-face svg { width: 32px; height: 32px; margin-bottom: 8px; }
.resume-block { margin-top: 20px; }
.resume-frame { width: 100%; height: 600px; border: 1px solid var(--border); background: #fff; }
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: #fff; padding: 10px 20px; text-decoration: none; border-radius: 3px; margin-top: 15px; }

/* Automation */
.automation-toggle { display:flex; gap:8px; margin: 1rem 0 0.5rem; font-family: var(--font-ui); }
.toggle-btn { padding: 8px 16px; font-size:13px; font-weight:500; border-radius: var(--radius); border:1px solid var(--border); background: transparent; color: var(--text-secondary); cursor:pointer; }
.toggle-btn.active { background: var(--bg-active); color: var(--text-primary); border-color: var(--accent); }
.automation-caption { font-size:12.5px; margin: 0 0 0.75rem; }
.before-list { display:flex; flex-direction:column; gap:6px; }
.before-step { display:flex; align-items:center; gap:10px; padding:8px 12px; border:1px solid var(--border); border-radius: var(--radius); font-size:13.5px; font-family: var(--font-ui); }
.before-step-num { color: var(--text-muted); font-size:12px; min-width:18px; }
.after-flow { display:flex; flex-direction:column; gap:4px; font-family: var(--font-ui); }
.after-step { background: var(--bg-elevated); border:1px solid var(--accent-dim); border-radius: var(--radius); padding:12px 16px; font-size:13.5px; }
.after-arrow { text-align:center; color: var(--text-muted); font-size:14px; }

/* Command Bar */
.cmdbar { display: flex; align-items: center; padding: 5px 15px; background: var(--bg); border-top: 1px solid var(--border); gap: 10px; }
.cmd-prompt { font-family: 'JetBrains Mono', monospace; color: var(--keyword); font-size: 13px; }
.cmd-input { flex: 1; background: transparent; border: none; color: var(--text); font-family: 'JetBrains Mono', monospace; font-size: 13px; outline: none; }
.cmd-feedback { font-size: 12px; color: #888; }
.cmd-feedback.error { color: #f44747; }

/* Statusbar */
.statusbar { height: 22px; background: var(--accent); color: #fff; display: flex; align-items: center; padding: 0 10px; font-size: 11px; gap: 15px; }
.status-item { display: flex; align-items: center; gap: 5px; }
.status-right { margin-left: auto; }

/* Mobile */
@media (max-width: 760px) {
  .sidebar { position: absolute; left: -260px; top: 30px; bottom: 0; z-index: 10; transition: left 0.2s; }
  .sidebar.open { left: 0; }
  .sidebar-toggle { display: block; }
  .editor-pane { padding: 20px; }
}
