:root {
  --ink: #18232b;
  --muted: #71808a;
  --line: #e3e9e7;
  --paper: #f7f9f7;
  --white: #ffffff;
  --coral: #ec6b57;
  --coral-soft: #fff0eb;
  --blue: #5d96b3;
  --blue-soft: #eaf4f7;
  --yellow: #e5ae45;
  --yellow-soft: #fff6dc;
  --green: #5aa77e;
  --green-soft: #e9f5ed;
  --shadow: 0 18px 45px rgba(24, 35, 43, 0.06);
  font-family: 'Manrope', sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--paper); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(236, 107, 87, 0.28); outline-offset: 2px; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 260px; flex: 0 0 260px; min-height: 100vh; padding: 30px 20px 22px; background: #eef3ef; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.brand-row { display: flex; align-items: center; gap: 11px; padding: 0 10px 30px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: white; background: var(--coral); font-weight: 800; font-size: 12px; letter-spacing: -0.5px; }
.brand-row h1 { margin: 0; font-size: 15px; letter-spacing: -0.5px; }
.brand-row p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.workspace-switcher { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 210px; padding: 12px 13px; margin-bottom: 28px; border: 1px solid #dfe7e2; border-radius: 14px; background: rgba(255, 255, 255, 0.82); box-shadow: 0 8px 18px rgba(24, 35, 43, 0.04); }
.workspace-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px var(--green-soft); margin: 0 4px; }
.workspace-switcher strong, .workspace-switcher small { display: block; }
.workspace-switcher strong { font-size: 12px; font-weight: 800; letter-spacing: -0.2px; }
.workspace-switcher small { color: var(--muted); font-size: 10px; margin-top: 2px; }
.chevron { margin-left: auto; color: var(--muted); font-size: 17px; }
.nav-label { margin: 0 10px 8px; color: #9aa7a4; text-transform: uppercase; font-size: 10px; letter-spacing: 1.2px; font-weight: 800; }
.nav-label:not(:first-child) { margin-top: 28px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 11px; padding: 10px; border: 0; border-radius: 8px; color: #61706e; background: transparent; text-align: left; font-size: 12px; font-weight: 600; }
.nav-item:hover, .nav-item.active { color: var(--ink); background: white; box-shadow: 0 4px 15px rgba(24, 35, 43, 0.05); }
.nav-item.active { font-weight: 800; }
.nav-icon { width: 19px; color: #8fa09b; font-size: 16px; text-align: center; }
.nav-item.active .nav-icon { color: var(--coral); }
.nav-count { margin-left: auto; min-width: 20px; padding: 2px 6px; border-radius: 5px; color: var(--coral); background: var(--coral-soft); font-size: 10px; text-align: center; }
.sidebar-bottom { margin-top: auto; }
.upgrade-card { padding: 17px; border-radius: 12px; color: #4b3e25; background: #f9eac9; }
.spark { width: 25px; height: 25px; display: grid; place-items: center; margin-bottom: 13px; border-radius: 7px; color: white; background: var(--yellow); }
.upgrade-card strong { display: block; font-size: 12px; }
.upgrade-card p { margin: 7px 0 13px; color: #827052; font-size: 10px; line-height: 1.55; }
.text-button { padding: 0; border: 0; color: var(--coral); background: transparent; font-size: 11px; font-weight: 800; }
.text-button span { margin-left: 5px; }
.user-profile { display: flex; align-items: center; gap: 9px; padding: 25px 6px 0; }
.avatar { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; color: white; background: #263b43; font-size: 10px; font-weight: 800; }
.user-profile strong, .user-profile small { display: block; }
.user-profile strong { font-size: 11px; }
.user-profile small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.more { margin-left: auto; color: #a2afac; font-size: 12px; letter-spacing: 1px; }

.main-content { width: calc(100% - 260px); max-width: 1500px; padding: 0 5.2% 60px; }
.topbar { height: 87px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; align-items: center; gap: 11px; color: #a0adaa; font-size: 11px; }
.breadcrumb strong { color: var(--ink); }
.topbar-actions { display: flex; align-items: center; gap: 17px; }
.icon-button { position: relative; width: 28px; height: 28px; padding: 0; border: 0; color: #7d8c8b; background: transparent; font-size: 22px; line-height: 1; }
.notification-dot { position: absolute; top: 1px; right: 2px; width: 5px; height: 5px; border: 1px solid var(--paper); border-radius: 50%; background: var(--coral); }
.new-project-button, .secondary-button { border: 0; border-radius: 7px; color: white; background: var(--coral); font-size: 11px; font-weight: 800; box-shadow: 0 7px 15px rgba(236, 107, 87, 0.18); }
.new-project-button { padding: 10px 15px; }
.new-project-button span, .secondary-button span { margin-right: 6px; font-size: 15px; vertical-align: -1px; }
.page-view { display: none; padding-top: 43px; animation: enter 0.35s ease both; }
.page-view.active-view { display: block; }
@keyframes enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
.eyebrow { margin: 0 0 8px; color: var(--coral); text-transform: uppercase; font-size: 10px; letter-spacing: 1.4px; font-weight: 800; }
h2 { margin: 0; font-size: clamp(25px, 3vw, 34px); letter-spacing: -1.6px; line-height: 1.1; }
.wave { color: var(--yellow); font-size: 22px; }
.heading-copy { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.secondary-button { padding: 11px 15px; }
.secondary-button:hover, .new-project-button:hover { background: #d95d4a; transform: translateY(-1px); }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat-card { position: relative; overflow: hidden; padding: 20px 21px; min-height: 134px; border-radius: 11px; }
.stat-card::after { content: ''; position: absolute; right: -22px; bottom: -34px; width: 105px; height: 105px; border: 17px solid rgba(255, 255, 255, 0.3); border-radius: 50%; }
.coral-card { color: #783a2d; background: #f9c4b6; }.blue-card { color: #254c62; background: #c0dbe4; }.yellow-card { color: #6d501c; background: #f4dc96; }.green-card { color: #29563e; background: #b9d9c3; }
.stat-top { display: flex; justify-content: space-between; color: inherit; opacity: 0.76; font-size: 11px; font-weight: 700; }
.stat-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; color: inherit; background: rgba(255, 255, 255, 0.38); font-weight: 800; }
.stat-card > strong { display: block; margin-top: 14px; font-size: 28px; letter-spacing: -1px; }
.stat-card p { margin: 4px 0 0; color: inherit; opacity: 0.7; font-size: 9px; }.trend { margin-right: 4px; font-weight: 800; }.trend.up { color: #2c8051; }.trend.down { color: #b35c43; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(290px, 1fr); gap: 22px; margin-bottom: 22px; }
.panel { padding: 23px; border: 1px solid var(--line); border-radius: 11px; background: var(--white); box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }.panel-heading h3 { margin: 0; font-size: 13px; letter-spacing: -0.3px; }.panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }.select-control { padding: 7px 27px 7px 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: white; font-size: 10px; }
.chart-wrap { display: flex; height: 202px; margin-top: 22px; }.chart-y-labels { display: flex; flex-direction: column; justify-content: space-between; padding: 0 11px 23px 0; color: #a1aca9; font-size: 9px; }.bar-chart { position: relative; flex: 1; }.chart-line { position: absolute; left: 0; right: 0; border-top: 1px dashed #e8eceb; }.line-one { top: 0; }.line-two { top: 25%; }.line-three { top: 50%; }.line-four { top: 75%; }.bars { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: space-around; padding-left: 6px; }.bar-group { position: relative; z-index: 1; width: 9%; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 9px; }.bar { display: block; width: 17px; min-height: 8px; border-radius: 4px 4px 1px 1px; background: #a9d2cf; transition: height .3s ease; }.bar[data-empty="true"] { min-height: 0; background: transparent; }.bar.highlighted { background: var(--coral); box-shadow: 0 5px 12px rgba(236, 107, 87, 0.22); }.bar-group small { position: absolute; bottom: -22px; width: 50px; color: #9da8a6; font-size: 8px; text-align: center; }
.health-score { color: var(--coral); font-size: 17px; font-weight: 800; }.health-score span { color: #a4aeab; font-size: 10px; font-weight: 500; }.health-ring { width: 145px; height: 145px; display: grid; place-items: center; margin: 20px auto 14px; border-radius: 50%; background: conic-gradient(var(--coral) 0 43%, var(--yellow) 43% 67%, #b8d8d0 67% 82%, #edf2ef 82% 100%); }.health-ring::before { content: ''; position: absolute; width: 112px; height: 112px; border-radius: 50%; background: white; }.ring-center { position: relative; z-index: 1; text-align: center; }.ring-center strong, .ring-center small { display: block; }.ring-center strong { font-size: 17px; }.ring-center small { margin-top: 4px; color: var(--muted); font-size: 9px; }.health-list { border-top: 1px solid var(--line); padding-top: 13px; }.health-list div { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-size: 10px; }.health-list strong { margin-left: auto; }.legend-dot { width: 7px; height: 7px; border-radius: 50%; }.legend-dot.coral { background: var(--coral); }.legend-dot.blue { background: var(--blue); }.legend-dot.yellow { background: var(--yellow); }
.recent-panel { padding-bottom: 10px; }.review-table { margin-top: 20px; }.table-row { display: grid; grid-template-columns: 1.35fr 1fr 1fr 1fr 20px; gap: 12px; align-items: center; min-height: 48px; border-top: 1px solid #edf0ef; color: #70807c; font-size: 10px; }.table-header { min-height: 30px; border: 0; color: #a3aeab; font-size: 9px; text-transform: uppercase; letter-spacing: .5px; font-weight: 800; }.file-name { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 700; }.file-icon { width: 23px; height: 23px; display: inline-grid; place-items: center; border-radius: 6px; color: white; font-size: 8px; font-weight: 800; }.file-icon.python { background: #5b9db1; }.file-icon.js { background: #d0a33d; }.status-pill { display: inline-block; padding: 5px 7px; border-radius: 5px; font-size: 9px; font-weight: 800; }.status-pill.warning { color: #9a6d1f; background: var(--yellow-soft); }.status-pill.danger { color: #b54c3d; background: var(--coral-soft); }.status-pill.success { color: #428360; background: var(--green-soft); }.row-arrow { border: 0; color: #9ba9a6; background: transparent; font-size: 16px; }.row-arrow:hover { color: var(--coral); }

.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; }.project-card { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: white; box-shadow: var(--shadow); }.project-color { height: 78px; display: flex; align-items: center; padding: 20px; color: white; font-size: 30px; font-weight: 800; }.coral-bg { background: #ed826e; }.blue-bg { background: #74aebe; }.yellow-bg { background: #dcb454; }.project-card-body { padding: 18px; }.project-card-title { display: flex; align-items: center; justify-content: space-between; }.project-card-title h3 { margin: 0; font-size: 14px; }.delete-project-button { padding: 4px; border: 0; color: #9eaaa7; background: transparent; font-size: 13px; letter-spacing: 1px; }.delete-project-button:hover { color: var(--coral); }.project-card p { height: 32px; margin: 9px 0 17px; color: var(--muted); font-size: 10px; line-height: 1.5; }.project-meta { display: flex; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--line); color: #98a5a2; font-size: 9px; }.open-project-button { width: 100%; margin-top: 17px; padding: 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: white; font-size: 10px; font-weight: 800; }.open-project-button:hover { border-color: var(--coral); color: var(--coral); }.open-project-button span { float: right; color: var(--coral); }.empty-project-card { min-height: 253px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; border: 1px dashed #cbd7d2; border-radius: 11px; color: var(--muted); background: transparent; }.empty-project-card span { width: 32px; height: 32px; display: grid; place-items: center; margin-bottom: 5px; border-radius: 50%; color: var(--coral); background: var(--coral-soft); font-size: 20px; }.empty-project-card strong { color: var(--ink); font-size: 11px; }.empty-project-card small { font-size: 9px; }
.guest-state .activity-panel .chart-wrap, .guest-state .health-panel .health-ring, .guest-state .health-panel .health-list { display: none; }
.history-panel { padding: 20px; }.filter-row { display: flex; justify-content: space-between; gap: 15px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }.search-box { display: flex; align-items: center; gap: 8px; width: 290px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; color: #9ca9a6; }.search-box input { width: 100%; padding: 8px 0; border: 0; outline: 0; color: var(--ink); font-size: 10px; }.history-item { display: grid; grid-template-columns: 25px 1fr auto 20px; gap: 11px; align-items: center; padding: 15px 0; border-bottom: 1px solid #edf0ef; }.history-item strong, .history-item small { display: block; }.history-item strong { font-size: 11px; }.history-item small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.empty-history { margin: 0; padding: 42px 0; color: var(--muted); font-size: 11px; text-align: center; }
.settings-panel { max-width: 800px; }.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 74px; border-bottom: 1px solid var(--line); }.setting-row:last-child { border-bottom: 0; }.setting-row strong { font-size: 12px; }.setting-row p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }.connection-status { color: var(--muted); font-size: 10px; }.connection-status span { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #bbc6c2; }.toggle input { display: none; }.toggle span { position: relative; display: block; width: 36px; height: 20px; border-radius: 20px; background: #dce5e0; }.toggle span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: white; transition: .2s; }.toggle input:checked + span { background: var(--green); }.toggle input:checked + span::after { left: 19px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 5; display: none; place-items: center; padding: 20px; background: rgba(24, 35, 43, 0.35); }.modal-backdrop.open { display: grid; }.modal { position: relative; width: min(100%, 410px); padding: 29px; border-radius: 13px; background: white; box-shadow: 0 25px 80px rgba(24, 35, 43, .2); }.modal h2 { font-size: 26px; }.modal-copy { margin: 10px 0 22px; color: var(--muted); font-size: 11px; line-height: 1.6; }.modal label { display: block; margin-bottom: 7px; font-size: 10px; font-weight: 800; }.modal input { width: 100%; padding: 11px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); outline: 0; font-size: 11px; }.modal input:focus { border-color: var(--coral); }.close-modal { position: absolute; top: 15px; right: 17px; border: 0; color: var(--muted); background: transparent; font-size: 22px; }.modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 20px; margin-top: 23px; }.toast { position: fixed; right: 25px; bottom: 25px; z-index: 8; display: flex; align-items: center; gap: 9px; padding: 12px 16px; border-radius: 8px; color: white; background: #263b43; box-shadow: var(--shadow); transform: translateY(100px); opacity: 0; transition: .3s; }.toast.show { transform: translateY(0); opacity: 1; }.toast span { color: #8bd6a9; }.toast p { margin: 0; font-size: 10px; font-weight: 700; }

.login-toggle, .logout-toggle { padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--ink); font-size: 10px; font-weight: 800; }
.login-toggle:hover, .logout-toggle:hover { border-color: var(--coral); color: var(--coral); }
.logout-toggle.hidden, .hidden { display: none !important; }
.auth-field { margin-bottom: 16px; }
.auth-actions { justify-content: space-between; }
.auth-modal { width: min(100%, 440px); }
.user-pill { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,0.75); }
.user-pill .avatar { width: 28px; height: 28px; font-size: 9px; }
.user-meta { display: flex; flex-direction: column; min-width: 0; }
.user-meta strong { font-size: 11px; }
.user-meta small { color: var(--muted); font-size: 9px; }
.user-pill .logout-toggle { margin-left: 4px; }

@media (max-width: 1050px) { .sidebar { width: 215px; flex-basis: 215px; }.main-content { width: calc(100% - 215px); padding: 0 3%; }.stat-grid { grid-template-columns: repeat(2, 1fr); }.projects-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 740px) { .sidebar { width: 62px; flex-basis: 62px; padding: 18px 9px; }.brand-row { padding: 0 5px 26px; }.brand-row > div:not(.brand-mark), .workspace-switcher > div, .workspace-switcher .chevron, .nav-label, .nav-item:not(.active)::after, .nav-item { font-size: 0; }.workspace-switcher { justify-content: center; padding: 11px 4px; }.nav-item { justify-content: center; padding: 11px 5px; }.nav-icon { font-size: 17px; }.nav-count { display: none; }.upgrade-card, .user-profile > div:not(.avatar), .more { display: none; }.user-profile { justify-content: center; padding: 20px 0 0; }.main-content { width: calc(100% - 62px); padding: 0 16px 40px; }.topbar { height: 70px; }.breadcrumb { font-size: 10px; }.topbar-actions { gap: 7px; }.topbar-actions .icon-button { display: none; }.new-project-button { padding: 9px 10px; font-size: 10px; }.page-view { padding-top: 28px; }.page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 24px; }.page-heading .secondary-button { align-self: stretch; }.stat-grid { gap: 9px; }.stat-card { min-height: 119px; padding: 15px; }.stat-card > strong { font-size: 24px; }.content-grid { grid-template-columns: 1fr; gap: 14px; }.panel { padding: 17px; }.chart-wrap { height: 175px; }.health-panel { display: none; }.table-row { grid-template-columns: 1.5fr 1fr 20px; gap: 8px; }.table-row > span:nth-child(2), .table-row > span:nth-child(4), .table-header > span:nth-child(2), .table-header > span:nth-child(4) { display: none; }.projects-grid { grid-template-columns: 1fr; }.empty-project-card { min-height: 155px; }.filter-row { flex-direction: column; }.search-box { width: 100%; }.setting-row { align-items: flex-start; flex-direction: column; justify-content: center; padding: 16px 0; gap: 10px; } }

.review-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.editor-panel, .result-panel { min-height: 510px; }
.language-badge, .result-mark { padding: 6px 8px; border-radius: 5px; color: #4a8079; background: #e5f2ef; font-size: 9px; font-weight: 800; }
.result-mark { color: var(--coral); background: var(--coral-soft); }
.editor-panel textarea { width: 100%; height: 370px; margin-top: 20px; padding: 17px; resize: vertical; border: 1px solid #dce5e2; border-radius: 8px; color: #dce9e5; background: #24353b; font: 12px/1.7 'DM Mono', monospace; outline: 0; }
.editor-panel textarea:focus { border-color: var(--coral); }
.editor-footer { display: flex; align-items: stretch; flex-direction: column; gap: 12px; margin-top: 15px; color: var(--muted); font-size: 9px; }
.editor-footer > span { display: inline-flex; align-items: center; width: fit-content; padding: 5px 8px; border: 1px solid var(--line); border-radius: 5px; color: #71807c; background: #f7faf8; font-size: 9px; }
.editor-footer .secondary-button:disabled { cursor: wait; opacity: .65; }
.result-panel pre { min-height: 370px; max-height: 420px; overflow: auto; margin: 20px 0 0; padding: 17px; border-radius: 8px; color: #526360; background: #f3f7f5; font: 11px/1.7 'DM Mono', monospace; white-space: pre-wrap; }
.editor-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; min-width: 0; }.editor-actions > button { width: 100%; min-height: 48px; white-space: normal; line-height: 1.2; }.run-button { padding: 11px 10px; border: 1px solid #d9e3df; border-radius: 7px; color: var(--ink); background: white; font-size: 11px; font-weight: 800; }.run-button:hover { border-color: var(--green); color: #317453; }.run-button:disabled { cursor: wait; opacity: .65; }

@media (max-width: 1050px) { .review-workspace { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .editor-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }.editor-footer > span { line-height: 1.4; }.editor-panel textarea { height: 300px; } }
