/* Dashboard workspace: restrained surfaces, clear actions, responsive panels. */
:root { --text2: #a6b4c8; --text3: #8b9bb2; --border: #253044; --border2: #334158; }
body { background: #0a101c; }
.topnav { background: #0e1624; padding: 0 24px; }
.logo-icon { box-shadow: none; }
.nav-badge { background: transparent; border: 0; color: var(--text2); }
.sidebar { width: 224px; background: #0e1624; }
.sidebar-item { min-height: 42px; border-radius: 8px; }
.sidebar-item.active { background: #15303e; color: #81e7f6; box-shadow: inset 3px 0 #4cd5e9; }
.sidebar-label { letter-spacing: 1.4px; }
.sidebar-footer { padding: 14px; }
.plan-card { background: #131e2e; border: 1px solid var(--border); box-shadow: none; }
.main { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 16px; padding: 18px; min-width: 0; overflow-y: auto; }
.workspace-heading { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.workspace-kicker { font-size: 10px; font-weight: 600; letter-spacing: 1.8px; text-transform: uppercase; color: var(--cyan); margin-bottom: 8px; }
.workspace-heading h1 { font: 600 clamp(21px, 2vw, 26px)/1.2 'Space Grotesk', sans-serif; letter-spacing: -.9px; }
.workspace-heading p { color: var(--text2); font-size: 12px; line-height: 1.6; margin-top: 5px; max-width: 560px; }
.workspace-actions { display: flex; gap: 8px; flex-shrink: 0; }
.workspace-actions .btn { min-height: 40px; }
.editor-panel, .results-panel { width: auto; min-width: 0; min-height: 440px; border: 1px solid var(--border); border-radius: 14px; background: #101a2a; box-shadow: 0 8px 24px #00000012; }
.panel-header { min-height: 54px; height: auto; padding: 9px 14px; gap: 12px; flex-wrap: wrap; background: #131e2e; }
.panel-title { font-size: 13px; }
.panel-actions { flex-wrap: wrap; }
#editorPanel > .panel-header .panel-actions { width: 100%; justify-content: flex-start; }
#scanBtn { margin-left: auto; }
.btn { min-height: 36px; padding: 8px 12px; }
.btn-primary, .fix-all-btn, .upgrade-btn { background: #66ddec; border: 1px solid #66ddec; color: #071820; box-shadow: none; }
.btn-primary:hover, .fix-all-btn:hover, .upgrade-btn:hover { background: #91eaf4; box-shadow: none; transform: none; }
.btn-ghost { background: transparent; }
.editor-tabs { padding: 0 14px; gap: 4px; background: #101a2a; overflow-x: auto; flex-shrink: 0; }
.etab { padding: 14px 12px; white-space: nowrap; min-height: 46px; }
.etab.active { color: #83e5f0; border-bottom-color: #66ddec; }
.code-area-wrap { background: #0c1422; min-height: 220px; }
.code-editor { font-size: 13px; line-height: 1.8; }
.line-numbers { background: #0c1422; color: #71849e; line-height: 1.8; }
.editor-footer { min-height: 38px; background: #101a2a; }
.source-hint { padding: 8px 14px; background: #101a2a; color: var(--text2); font-size: 12px; line-height: 1.6; border-bottom: 1px solid var(--border); }
.empty-state { padding: 36px 28px; justify-content: center; }
.empty-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 16px; background: #16313e; color: #83e5f0; border: 1px solid #285062; font-size: 26px; margin-bottom: 20px; }
.empty-title { font-size: 21px; letter-spacing: -.5px; }
.empty-desc { max-width: 330px; font-size: 13px; line-height: 1.8; }
.result-steps { width: 100%; max-width: 330px; display: grid; gap: 16px; margin-top: 28px; text-align: left; }
.result-step { display: flex; align-items: flex-start; gap: 12px; }
.result-step > span { display: grid; place-items: center; border: 1px solid var(--border2); border-radius: 7px; width: 26px; height: 26px; flex-shrink: 0; color: #83e5f0; font-size: 11px; }
.result-step strong { font-size: 12px; font-weight: 500; }
.result-step p { font-size: 12px; line-height: 1.6; color: var(--text2); margin-top: 3px; }
.score-header { background: #111d2e; }
.issue-card { box-shadow: none; }
:is(button, a, input, textarea, select, summary):focus-visible { outline: 2px solid #83e5f0; outline-offset: 3px; }
.skip-link { position: fixed; top: -60px; left: 20px; z-index: 1000; padding: 12px; background: var(--cyan); color: #071820; border-radius: 8px; }
.skip-link:focus { top: 8px; }
#connectEditorBanner { grid-column: 1 / -1; }
.main:has(#connectEditorBanner:not([style*="display:none"]):not([style*="display: none"])) { grid-template-rows: auto auto minmax(0,1fr); }
@media (max-width: 1200px) {
  .main { padding: 20px; gap: 16px; }
  .workspace-heading { align-items: center; }
  .workspace-actions { flex-wrap: wrap; }
}
@media (max-width: 1024px) {
  .main { display: flex; flex-direction: column; overflow: visible; }
  .workspace-heading { flex-shrink: 0; }
  .editor-panel { min-height: 480px; }
  .results-panel { min-height: 400px; }
  .sidebar { width: 260px; }
  .sidebar-collapse { display: none; }
  .sidebar.collapsed { width: 260px; }
  .sidebar.collapsed .sidebar-item { font-size: .82rem; justify-content: flex-start; gap: 10px; padding: 10px 12px; }
  .sidebar.collapsed .sidebar-label, .sidebar.collapsed .sidebar-footer { display: block; }
  .sidebar.collapsed .sidebar-section { padding: 16px 12px 8px; }
}
@media (max-width: 640px) {
  .topnav { padding: 0 16px; }
  .main { padding: 14px 12px; }
  .workspace-heading { display: block; padding: 0 4px 4px; }
  .workspace-heading p { font-size: 12px; }
  .workspace-actions { flex-direction: row; flex-wrap: wrap; margin-top: 16px; }
  .workspace-actions .btn { flex: 1; justify-content: center; }
  .panel-header { padding: 10px 12px; }
  .panel-actions { width: 100%; justify-content: flex-start; gap: 6px; }
  .panel-actions .btn, .lang-select { min-height: 40px; }
  #scanBtn { margin-left: auto; }
  #sampleBtn { order: 4; }
  .editor-tabs { padding: 0 6px; gap: 0; }
  .etab { padding: 14px 10px; font-size: 11px; }
  #urlTab, #liveurlTab, #uploadTab { padding: 24px 16px !important; }
  #urlTab > div:has(input), #liveurlTab > div:has(input) { flex-direction: column; }
  #urlTab input, #liveurlTab input { width: 100%; min-width: 0; }
  .empty-state { padding: 30px 20px; }
  .nav-badge { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.code-editor, .line-numbers { line-height: 23.4px; } ::-webkit-scrollbar-thumb { background: #334158; } .editor-tabs { overflow-y: hidden; }
/* Data Access */
#accessPanel { --surface1: var(--surface); --border1: var(--border); position: fixed; inset: 0; z-index: 200; overflow-y: auto; background: var(--bg); padding: 28px 24px 60px; }
#accessPanel [hidden] { display: none !important; }
.access-shell { max-width: 1100px; margin: auto; }
.access-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 36px; }
.access-eyebrow { color: var(--text2); font-size: 12px; }
.access-hero { margin-bottom: 30px; }
.access-hero h1 { font: 600 clamp(28px,4vw,40px)/1.2 'Space Grotesk', sans-serif; letter-spacing: -1.2px; margin: 10px 0 14px; }
.access-hero p { max-width: 650px; font-size: 14px; color: var(--text2); line-height: 1.8; }
.access-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 26px; }
.access-choice { display: flex; align-items: center; gap: 14px; text-align: left; padding: 20px; background: var(--surface); border: 1px solid var(--border2); border-radius: 12px; color: var(--text); cursor: pointer; font-family: inherit; }
.access-choice[aria-pressed="true"] { border-color: #66ddec; background: #102833; box-shadow: inset 0 0 0 1px #66ddec22; }
.access-choice strong { display: block; font-size: 14px; margin-bottom: 6px; }
.access-choice small { color: var(--text2); font-size: 12px; line-height: 1.6; }
.access-choice-icon { font-size: 23px; color: #83e5f0; }
.access-tag { font-size: 10px; font-weight: 600; color: #83e5f0; background: #16333f; padding: 6px 9px; border-radius: 20px; white-space: nowrap; margin-left: auto; }
.access-card { border: 1px solid var(--border); border-radius: 14px; padding: 26px; background: var(--surface); min-width: 0; }
.access-section-heading { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 28px; }
#accessPanel h2 { font-size: 20px; letter-spacing: -.4px; }
#accessPanel h3 { font-size: 16px; margin: 8px 0 12px; }
.access-section-heading p, .access-database-intro p { color: var(--text2); font-size: 13px; line-height: 1.8; margin-top: 10px; max-width: 670px; }
.access-label { display: block; font-size: 12px; font-weight: 500; margin-bottom: 9px; }
.access-url-row, .access-query-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.access-url-row input { flex: 1; min-width: 180px; }
#accessPanel input:not([type="checkbox"]), #accessPanel textarea { background: var(--bg2); border: 1px solid var(--border2); padding: 13px; color: var(--text); border-radius: 8px; font: inherit; font-size: 13px; }
#accessPanel .btn { min-height: 42px; }
#accessPanel .btn-secondary { border: 1px solid var(--border2); background: var(--surface2); color: var(--text); }
.access-help { color: var(--text2); font-size: 12px; line-height: 1.8; margin: 10px 0; }
.access-status { font-size: 12px; color: var(--text2); line-height: 1.7; margin-top: 12px; }
.access-status:empty { display: none; }
.access-coverage { display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--border); gap: 24px; padding-top: 24px; margin-top: 26px; }
.access-coverage strong { font-size: 12px; font-weight: 500; }
.access-coverage p, .access-next p { font-size: 12px; color: var(--text2); line-height: 1.8; margin-top: 6px; }
.access-setup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 22px 0; align-items: start; }
.access-step { color: #83e5f0; font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.access-query { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 16px; }
.access-query summary { font-size: 12px; color: var(--text2); cursor: pointer; }
.access-query summary span { float: right; font-size: 11px; }
#accessSql { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 260px; overflow: auto; font: 11px/1.7 'JetBrains Mono',monospace; background: var(--bg2); border-radius: 8px; padding: 14px; margin-top: 16px; color: var(--text2); }
#accessMetadata { width: 100%; min-height: 155px; resize: vertical; font-family: 'JetBrains Mono',monospace !important; font-size: 12px !important; line-height: 1.7 !important; }
.access-next { padding: 18px 22px; border-left: 2px solid var(--border2); margin-top: 24px; }
.access-results { overflow-wrap: anywhere; scroll-margin-top: 20px; }
#accessPanel th { white-space: nowrap; }
#accessPanel button:disabled { opacity: .5; cursor: not-allowed; }
@media(max-width:700px) { #accessPanel { padding: 20px 16px 40px; } .access-top { margin-bottom: 28px; } .access-choices, .access-setup-grid, .access-coverage { grid-template-columns: 1fr; } .access-choices { gap: 10px; } .access-choice { padding: 16px; } .access-card { padding: 20px; } .access-section-heading > .access-tag { display: none; } .access-url-row { flex-direction: column; align-items: stretch; } .access-url-row input { width: 100%; min-width: 0; } .access-coverage { gap: 16px; } #accessTestBlock > div[style*="display:grid"] { grid-template-columns: minmax(0,1fr) !important; } }
/* VibeSafe brand palette and focused workspace */
body { background: radial-gradient(ellipse at 15% 0%, #00354b70, transparent 48%), #060b1c; }
.topnav, .sidebar { background: #080f22; border-color: #15304b; }
.main { grid-template-rows: minmax(0,1fr); grid-template-columns: minmax(0,1.55fr) minmax(340px,1fr); padding: 12px; gap: 12px; }
.main:has(#connectEditorBanner:not([style*="display:none"]):not([style*="display: none"])) { grid-template-rows: auto minmax(0,1fr); }
.editor-panel, .results-panel { border-color: #153650; background: #0a1227; }
.panel-header { background: #0a1123; }
.code-area-wrap, .line-numbers { background: #070d1d; }
.editor-tabs, .editor-footer { background: #101b2e; }
.btn-primary, .fix-all-btn, .upgrade-btn, .mon-primary { background: linear-gradient(110deg,#00c8f4,#2868ed 55%,#7435ed); border-color: #387bfc; color: #fff; box-shadow: 0 3px 14px #067cee25; }
.btn-primary:hover, .fix-all-btn:hover, .upgrade-btn:hover, .mon-primary:hover { background: linear-gradient(110deg,#19d5ff,#3d7aff 55%,#8651ff); color: white; }
.sidebar-item.active { background: linear-gradient(100deg,#04364a,#171b40); color: #00d4ff; }
#editorPanel > .panel-header .panel-actions { width: auto; margin-left: auto; }
#editorPanel > .panel-header { gap: 8px; }
#sourceHint { display: none; }
.result-view { display: flex; padding: 3px; border: 1px solid #263657; background: #070e1e; border-radius: 7px; }
.result-view button { padding: 6px 8px; border: 0; border-radius: 4px; background: transparent; color: var(--text2); cursor: pointer; font: 500 11px 'Inter',sans-serif; }
.result-view button[aria-pressed="true"] { background: #15314a; color: #00d4ff; }
#resultsPanel[data-view="beginner"] :is(.code-snippet,.issue-line,.issue-type) { display: none; }
#resultsPanelActions { gap: 6px; }
#resultsPanel > .panel-header { padding: 9px 12px; gap: 8px; }
#teamPanel { position: fixed; inset: 0; z-index: 200; overflow-y: auto; padding: 24px; background: radial-gradient(ellipse at 90% 0%,#24145c40,transparent 50%),#080c18; --border1: #213252; --surface1: #10182c; }
.team-shell { max-width: 1120px; margin: auto; }
.team-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.team-top > span { font-size: 12px; color: var(--text2); }
.team-heading { margin-bottom: 24px; }
.team-heading h1 { font: 600 28px 'Space Grotesk',sans-serif; letter-spacing: -.7px; }
.team-heading p, .team-card > p, .team-section-head p { color: var(--text2); font-size: 13px; line-height: 1.7; margin-top: 8px; }
.team-grid { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 20px; align-items: start; }
.team-card { padding: 22px; border: 1px solid #213252; border-radius: 14px; background: #10182c; min-width: 0; }
.team-card h2 { font-size: 16px; font-weight: 600; }
.team-invite { grid-column: 2; grid-row: 1; }
.team-members { grid-column: 1; grid-row: 1; }
.team-history { grid-column: 1 / -1; }
.team-invite label { display: block; font-size: 12px; margin: 22px 0 8px; }
.team-invite input { width: 100%; min-width: 0; border: 1px solid #304262; border-radius: 8px; background: #0a1123; color: var(--text); padding: 12px; font: inherit; font-size: 13px; }
.team-invite .btn { width: 100%; justify-content: center; margin-top: 12px; min-height: 40px; }
#inviteStatus { margin-top: 12px; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
#inviteStatus:empty { display: none; }
.team-note { border-top: 1px solid #213252; margin-top: 18px; padding-top: 14px; color: var(--text2); font-size: 12px; line-height: 1.7; }
#teamMembersList { margin-top: 18px; }
#teamMembersList > div { padding: 14px 0 !important; }
#teamMembersList > div > div:nth-child(2) { min-width: 0; overflow-wrap: anywhere; }
#teamMembersList > div > span { white-space: nowrap; }
.team-section-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
#teamScanHistory { overflow-x: auto; }
#teamScanHistory table { min-width: 600px; }
#teamScanHistory th { background: #0b1225; padding: 12px !important; }
#teamScanHistory td { padding: 14px 12px !important; }
#teamScanHistory tbody tr:hover { background: #17305155; }
.team-empty { padding: 30px 12px; text-align: center; color: var(--text2); font-size: 13px; }
@media(max-width:1024px) { .main { display: flex; } }
@media(max-width:760px) { .team-grid { grid-template-columns: minmax(0,1fr); } .team-invite { grid-column: 1; grid-row: 1; } .team-members { grid-column: 1; grid-row: 2; } #teamPanel { padding: 18px 14px; } .team-card { padding: 18px; } }
@media(max-width:640px) { #editorPanel > .panel-header .panel-actions { width: 100%; margin: 0; } #resultsPanelActions { width: auto; } .result-view button { min-height: 32px; } }
.team-invite { grid-row: 1 / span 2; }
.team-history { grid-column: 1; grid-row: 2; }
@media(max-width:760px) { .team-invite { grid-row: 1; } .team-history { grid-column: 1; grid-row: 3; } }
