:root { --sidebar: 248px; --sidebar-collapsed: 68px; --ink: #17202a; --muted: #6b7280; --line: #e5e7eb; --accent: #176b5b; }
* { letter-spacing: 0; }
body { color: var(--ink); min-height: 100vh; }
.app-shell { min-height: 100vh; }
.sider-layout { overflow: hidden; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: #fff; border-right: 1px solid var(--line); padding: 24px 18px; z-index: 1030; display: flex; flex-direction: column; transition: width .18s ease, padding .18s ease; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 1.25rem; font-weight: 750; }
.brand-mark { display: inline-grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; background: var(--accent); color: #fff; border-radius: 7px; font-weight: 800; }
.sidebar-collapse { position: absolute; top: 27px; right: -13px; z-index: 1; width: 26px; height: 26px; padding: 0; place-items: center; color: #64706d; background: #fff; border: 1px solid var(--line); border-radius: 50%; box-shadow: 0 2px 7px rgba(23,32,42,.1); font-size: .72rem; }
.sidebar-collapse:hover { color: var(--accent); border-color: #a4bdb8; }
.sidebar .nav-link { display: flex; align-items: center; color: #45505c; padding: 10px 12px; border-radius: 6px; white-space: nowrap; overflow: hidden; }
.sidebar .nav-link:hover { background: #f0f5f3; color: var(--accent); }
.sidebar .nav-link.active { background: #eaf4f1; color: var(--accent); font-weight: 650; }
.sidebar .nav-link i { width: 25px; flex: 0 0 25px; display: inline-block; }
.sidebar-user { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--line); }
.sidebar-account { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.sidebar-account i { flex: 0 0 auto; }
.sidebar-account-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-backdrop { display: none; }
.sider-main { margin-left: var(--sidebar); height: 100vh; min-width: 0; display: grid; grid-template-rows: 38px minmax(0, 1fr); overflow: hidden; background: #eef2f1; transition: margin-left .18s ease; }
.sidebar-collapsed .sidebar { width: var(--sidebar-collapsed); padding-inline: 12px; }
.sidebar-collapsed .sider-main { margin-left: var(--sidebar-collapsed); }
.sidebar-collapsed .brand { justify-content: center; }
.sidebar-collapsed .brand-label,.sidebar-collapsed .nav-label,.sidebar-collapsed .sidebar-user-label,.sidebar-collapsed .sidebar-account-label,.sidebar-collapsed .sidebar-logout-label { display: none; }
.sidebar-collapsed .sidebar .nav-link { justify-content: center; padding-inline: 10px; }
.sidebar-collapsed .sidebar .nav-link i { width: auto; flex-basis: auto; font-size: 1.08rem; }
.sidebar-collapsed .sidebar-user { padding-inline: 0; }
.sidebar-collapsed .sidebar-account { justify-content: center; }
.app-tabs-bar { min-width: 0; display: flex; align-items: stretch; background: #fff; border-bottom: 1px solid var(--line); }
.app-menu-button { width: 38px; padding: 0; border: 0; border-right: 1px solid var(--line); border-radius: 0; font-size: 1.1rem; }
.app-tabs { min-width: 0; flex: 1; display: flex; overflow-x: auto; scrollbar-width: thin; }
.app-tab { position: relative; height: 37px; min-width: 104px; max-width: 184px; flex: 0 1 148px; display: flex; align-items: stretch; color: #58636d; background: #f8faf9; border-right: 1px solid var(--line); font-size: .82rem; }
.app-tab::after { content: ""; position: absolute; inset: auto 0 0; height: 2px; background: transparent; }
.app-tab.active { color: var(--ink); background: #fff; }
.app-tab.active::after { background: var(--accent); }
.app-tab-select,.app-tab-close { min-width: 0; border: 0; color: inherit; background: transparent; }
.app-tab-select { flex: 1; padding: 0 3px 0 11px; text-align: left; overflow: hidden; }
.app-tab-select span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-tab-close { width: 28px; flex: 0 0 28px; padding: 0; font-size: .64rem; opacity: .5; }
.app-tab-close:hover { color: #a52f35; background: #f4eeee; opacity: 1; }
.app-tab-panels { position: relative; min-width: 0; min-height: 0; }
.app-tab-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #f8faf9; }
.main-content { margin-left: var(--sidebar); min-height: 100vh; }
.embedded-page { overflow: auto; }
.embedded-content { margin-left: 0; min-height: 100vh; }
.content-wrap { padding: 30px clamp(20px, 4vw, 52px) 60px; }
.metric { display: flex; align-items: center; gap: 18px; min-height: 112px; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 8px; color: inherit; text-decoration: none; }
.metric:hover { border-color: #a4bdb8; box-shadow: 0 6px 18px rgba(23,32,42,.06); }
.metric > i { font-size: 1.5rem; color: var(--accent); background: #eaf4f1; padding: 10px 13px; border-radius: 7px; }
.metric strong, .metric span { display: block; }
.metric strong { font-size: 1.75rem; line-height: 1; }
.metric span { color: var(--muted); margin-top: 7px; }
.section-title { font-size: 1.05rem; font-weight: 700; }
.action-list { max-width: 760px; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.action-list a { display: flex; align-items: center; gap: 15px; padding: 17px; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.action-list a:last-child { border-bottom: 0; }.action-list small,.action-list b { display: block; }.action-list small { color: var(--muted); }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.table th { background: #f8faf9; color: #64706d; font-size: .78rem; text-transform: uppercase; }
.empty { color: var(--muted); text-align: center; padding: 42px !important; }
.form-sheet { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 26px; max-width: 900px; }
.hero { min-height: 68vh; display: flex; align-items: center; padding: 72px 0; background: #f8faf9; }
.hero h1 { font-size: clamp(2.35rem, 5vw, 4.5rem); max-width: 800px; line-height: 1.04; font-weight: 760; }
.hero-kicker { color: var(--accent); font-weight: 700; margin-bottom: 16px; }
.hero-console { background: #151b20; color: #dce4e1; border-radius: 8px; min-height: 330px; padding: 0 26px 26px; box-shadow: 0 25px 60px rgba(23,32,42,.2); }
.console-top { height: 52px; display: flex; align-items: center; gap: 8px; }.console-top span { width: 11px; height: 11px; background: #687178; border-radius: 50%; }
.hero-console code { color: #dce4e1; line-height: 1.9; }.hero-console code span { color: #96aaa4; }.hero-console code .ok { color: #63d2a7; }
.feature-band { padding: 58px 0; background: #fff; }.feature-band i { color: var(--accent); font-size: 1.7rem; }.feature-band h2 { font-size: 1.1rem; margin-top: 14px; }.feature-band p { color: var(--muted); }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #f4f7f6; }.login-panel { width: min(420px, 100%); padding: 36px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }.login-panel h1 { font-size: 1.6rem; margin-top: 26px; }
.workspace { display: grid; grid-template-columns: 240px minmax(0, 1fr); height: calc(100vh - 60px); background: #fff; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }.schema-panel { padding: 18px; border-right: 1px solid var(--line); overflow: auto; }.panel-title,.editor-head { font-weight: 700; }.schema-panel details { padding: 8px 0; }.schema-panel summary { cursor: pointer; }.schema-panel ul { color: var(--muted); margin: 8px 0 0 12px; padding-left: 16px; font-size: .85rem; }.query-panel { min-width: 0; display: grid; grid-template-rows: auto 230px 1fr; }.editor-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }.sql-editor { width: 100%; height: 230px; border: 0; border-bottom: 1px solid var(--line); outline: 0; resize: none; padding: 18px; font: 14px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; background: #17202a; color: #eef5f3; }.query-result { overflow: auto; }.result-meta { padding: 9px 14px; font-size: .8rem; color: var(--muted); border-bottom: 1px solid var(--line); }
.terminal-workspace { min-width: 0; }.terminal-toolbar { min-height: 46px; padding: 6px 8px; background: #20282e; display: flex; align-items: center; gap: 7px; border-radius: 7px 7px 0 0; }.terminal-tabs { min-width: 0; flex: 1; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; }.terminal-tab { height: 33px; display: flex; align-items: stretch; flex: 0 0 auto; color: #b9c5c1; background: #303a3e; border: 1px solid #465155; border-radius: 5px; }.terminal-tab.active { color: #fff; background: #176b5b; border-color: #358b79; }.terminal-tab-select,.terminal-tab-close { border: 0; color: inherit; background: transparent; }.terminal-tab-select { max-width: 170px; padding: 0 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.terminal-tab-close { width: 30px; padding: 0; }.terminal-tab-close:hover { background: rgba(255,255,255,.12); }.terminal-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }.terminal-icon-button { width: 32px; height: 32px; padding: 0; display: inline-grid; place-items: center; }.terminal-timeout { color: #b9c5c1; font-size: .75rem; display: inline-flex; gap: 5px; align-items: center; white-space: nowrap; }.credential-bar { display: flex; gap: 8px; background: #fff; border: 1px solid var(--line); padding: 10px; }.credential-bar .form-control { max-width: 260px; }.terminal-panels { height: calc(100vh - 116px); min-height: 420px; background: #101619; border-radius: 0 0 7px 7px; overflow: hidden; }.terminal-panel { width: 100%; height: 100%; padding: 10px; }.terminal-panel .xterm { height: 100%; }.session-history { width: 270px; max-height: min(430px, 70vh); overflow-y: auto; }.session-history-item span,.session-history-item small { display: block; overflow: hidden; text-overflow: ellipsis; }.session-history-item small { color: var(--muted); margin-top: 2px; }
.browser-workspace { height: calc(100vh - 60px); min-height: 480px; display: grid; grid-template-rows: 46px minmax(0, 1fr); overflow: hidden; background: #101619; border-radius: 7px; }
.browser-toolbar { min-width: 0; padding: 6px 8px 6px 12px; display: flex; align-items: center; gap: 10px; color: #c6d0cd; background: #20282e; }
.browser-timeout { min-width: 0; display: inline-flex; align-items: center; gap: 5px; font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.browser-actions { margin-left: auto; display: flex; gap: 6px; flex: 0 0 auto; }
.browser-icon-button { width: 32px; height: 32px; padding: 0; display: inline-grid; place-items: center; }
.browser-screen { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #101619; outline: 0; }
.browser-screen > canvas { width: 100% !important; height: 100% !important; object-fit: contain; }
.browser-overlay { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 14px; color: #e8eeec; background: #101619; text-align: center; }
.browser-overlay p { max-width: 520px; margin: 0; color: #b9c5c1; }
.browser-workspace:fullscreen { width: 100vw; height: 100vh; border-radius: 0; }
.remote-credentials { max-width: 680px; }
.remote-workspace { height: calc(100vh - 60px); min-height: 520px; display: grid; grid-template-rows: 46px minmax(0, 1fr); overflow: hidden; background: #101619; border-radius: 7px; }
.remote-toolbar { padding: 6px 8px 6px 14px; display: flex; align-items: center; gap: 8px; color: #dce4e1; background: #20282e; }
.remote-icon-button { width: 32px; height: 32px; padding: 0; display: inline-grid; place-items: center; }
.remote-workspace iframe { width: 100%; height: 100%; border: 0; background: #101619; }
.remote-workspace:fullscreen { width: 100vw; height: 100vh; border-radius: 0; }
.htmx-indicator { display: none; }.htmx-request .htmx-indicator { display: inline-block; }
@media (max-width: 991px) { .sidebar { transform: translateX(-100%); transition: transform .2s; }.sidebar.open { transform: none; }.sidebar-backdrop.show { display: block; position: fixed; inset: 0; z-index: 1020; background: rgba(23,32,42,.34); }.sider-main,.main-content { margin-left: 0; }.workspace { grid-template-columns: 1fr; height: auto; }.schema-panel { max-height: 220px; border-right: 0; border-bottom: 1px solid var(--line); }.query-result { min-height: 350px; }.hero { padding: 48px 0; } }
@media (max-width: 575px) { .content-wrap { padding: 20px 12px 40px; }.form-sheet,.login-panel { padding: 20px; }.credential-bar { flex-direction: column; }.credential-bar .form-control { max-width: none; }.terminal-timeout,.browser-timeout { display: none; }.terminal-toolbar { align-items: flex-start; flex-wrap: wrap; }.terminal-tabs { order: 2; flex-basis: 100%; }.terminal-actions { margin-left: auto; }.terminal-panels { height: calc(100vh - 158px); min-height: 360px; }.browser-workspace,.remote-workspace { height: calc(100vh - 50px); min-height: 420px; } }
