:root {
  font-family: "Segoe UI", Arial, sans-serif;
  color: #17212b;
  background: #f3f6f8;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #17212b;
  --muted: #687680;
  --line: #dce3e8;
  --blue: #1266a8;
  --blue-dark: #0e548e;
  --green: #168657;
  --red: #b33838;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.topbar { height: 76px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 6px; background: #145f99; color: white; font-weight: 750; font-size: 22px; }
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-size: 17px; }
.brand-copy span, .connection, .page-heading p, .section-heading p { color: var(--muted); font-size: 13px; }
.connection { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.connection-dot { width: 8px; height: 8px; border-radius: 50%; background: #9aa6ad; }
.connection.online .connection-dot { background: #1a9a62; }
.quiet-button, .primary-button, .action-button { border: 1px solid var(--line); border-radius: 5px; min-height: 36px; padding: 7px 12px; background: white; color: var(--ink); }
.quiet-button:hover, .action-button:hover { background: #f6f9fb; border-color: #b7c5cf; }
.primary-button { background: var(--blue); color: white; border-color: var(--blue); font-weight: 650; }
.primary-button:hover { background: var(--blue-dark); }
.page-heading { display: flex; align-items: center; justify-content: space-between; padding: 32px 0 24px; }
h1, h2, p { margin: 0; }
.page-heading h1 { font-size: 25px; margin-bottom: 5px; }
.page-heading p, .section-heading p { line-height: 1.5; }
.summary { min-width: 104px; display: flex; gap: 7px; align-items: baseline; justify-content: center; border-inline-start: 1px solid var(--line); padding-inline-start: 18px; color: var(--muted); font-size: 13px; }
.summary span:first-child { color: var(--ink); font-size: 22px; font-weight: 650; }
.upload-section, .projects-section { border-top: 1px solid var(--line); padding: 22px 0 26px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-heading h2 { font-size: 17px; margin-bottom: 4px; }
.upload-form { display: grid; grid-template-columns: minmax(180px, .85fr) minmax(260px, 1.5fr) auto; align-items: end; gap: 12px; }
.field { display: grid; gap: 7px; font-size: 13px; font-weight: 600; }
.field input, .field select, #password, #email { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid #cbd5dc; border-radius: 5px; background: white; color: var(--ink); outline: none; }
.field input:focus, .field select:focus, #password:focus, #email:focus { border-color: var(--blue); box-shadow: 0 0 0 2px #1266a81e; }
.category-field, .category-help, .consent-field { grid-column: 1 / -1; }
.category-help { padding: 10px 12px; border-inline-start: 3px solid #3285b8; background: #eaf2f7; color: #30424e; font-size: 13px; line-height: 1.55; }
.consent-field { display: flex; align-items: flex-start; gap: 9px; color: #35444f; font-size: 13px; line-height: 1.5; }
.consent-field input { margin-top: 3px; flex: 0 0 auto; accent-color: var(--blue); }
.consent-field a { color: var(--blue-dark); }
.dropzone { position: relative; min-height: 68px; display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; align-content: center; column-gap: 10px; padding: 8px 12px; border: 1px dashed #aebdc7; border-radius: 5px; background: #fbfdfe; cursor: pointer; }
.dropzone:hover, .dropzone.dragging { border-color: var(--blue); background: #f1f8fd; }
.dropzone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop-icon { grid-row: 1 / 3; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 4px; background: #e8f2fa; color: var(--blue); font-size: 22px; }
.dropzone > span:nth-of-type(2) { align-self: end; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.drop-hint { align-self: start; color: var(--muted); font-size: 12px; }
.upload-button { min-width: 116px; min-height: 40px; }
.upload-button:disabled { opacity: .65; cursor: progress; }
.status-message { min-height: 20px; margin-top: 9px; color: var(--green); font-size: 13px; }
.status-message.error, .error-text { color: var(--red); }
.list-heading { margin-bottom: 12px; }
.table-wrap { overflow-x: auto; }
.projects-table { width: 100%; border-collapse: collapse; text-align: right; }
.projects-table th { height: 38px; color: var(--muted); font-size: 12px; font-weight: 600; border-bottom: 1px solid var(--line); }
.projects-table td { padding: 13px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.projects-table th:first-child, .projects-table td:first-child { padding-inline-start: 0; }
.project-name { font-weight: 650; overflow-wrap: anywhere; }
.project-meta { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; direction: ltr; text-align: right; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; }
.status-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #9aa6ad; }
.status-pill.running { color: #16754e; }
.status-pill.running::before { background: #1a9a62; }
.row-actions { display: flex; justify-content: flex-start; flex-wrap: wrap; gap: 6px; }
.action-button { min-height: 32px; padding: 5px 9px; font-size: 12px; }
.action-button.run { color: #126341; border-color: #b8dec9; }
.action-button.stop { color: #8c5413; border-color: #ead4b0; }
.action-button.delete { color: var(--red); border-color: #ecc8c8; }
.action-button.edit { color: #145f99; border-color: #b9d6ea; }
.action-button:disabled { opacity: .5; cursor: not-allowed; }
.empty-state { border: 1px dashed #cbd5dc; padding: 28px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.error-text { font-size: 13px; min-height: 20px; margin-top: 10px; }
.login-view { width: min(390px, 100%); margin: 70px auto; padding: 24px; border: 1px solid var(--line); border-radius: 6px; background: white; }
.login-view h1 { font-size: 21px; margin-bottom: 6px; }
.login-view > p { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.login-view form { display: grid; gap: 9px; }
.login-view label { font-size: 13px; font-weight: 600; }
.login-view .primary-button { margin-top: 5px; }
.auth-toggle { display: block; margin: 14px auto 0; }
.provision-form, .permission-form { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 16px; max-width: 820px; }
.provision-wide { grid-column: 1 / -1; }
.permission-form { grid-template-columns: minmax(220px, 2fr) minmax(180px, 1fr) auto; align-items: end; max-width: 1100px; padding: 18px; border: 1px solid var(--line); border-radius: 6px; background: #172130; }
.users-table { width: 100%; margin-top: 20px; border-collapse: collapse; text-align: right; }
.users-table th, .users-table td { padding: 11px 8px; border-bottom: 1px solid var(--line); }
.users-table th { color: var(--muted); font-size: 12px; }
.user-resource-summary { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.user-role-select { min-width: 145px; min-height: 36px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: #111925; }
.user-revoke-button { min-width: 34px; min-height: 34px; padding: 0; font-size: 20px; line-height: 1; }
.user-revoke-button:disabled { opacity: .45; cursor: not-allowed; }
#users-content { max-width: 100%; overflow-x: auto; }
.logs-dialog { width: min(820px, calc(100% - 24px)); max-height: min(80vh, 720px); border: 1px solid var(--line); border-radius: 6px; padding: 18px; color: var(--ink); }
.logs-dialog::backdrop { background: #10192299; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.dialog-heading h2 { font-size: 17px; }
.logs-dialog pre { direction: ltr; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; overflow: auto; max-height: 62vh; margin: 0; padding: 12px; background: #f2f5f7; border-radius: 4px; color: #26343e; font: 12px/1.5 ui-monospace, Consolas, monospace; }
.editor-dialog { width: min(1040px, calc(100% - 24px)); max-height: min(88vh, 900px); border: 1px solid var(--line); border-radius: 6px; padding: 18px; color: var(--ink); }
.editor-dialog::backdrop { background: #10192299; }
.editor-dialog .dialog-heading { align-items: flex-start; }
.editor-dialog .dialog-heading h2 { margin-bottom: 4px; }
.editor-dialog .dialog-heading p, .editor-hint { color: var(--muted); font-size: 12px; }
.editor-toolbar { display: grid; grid-template-columns: auto minmax(180px, 1fr) auto; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 13px; font-weight: 600; }
.editor-toolbar select { min-height: 38px; min-width: 0; padding: 6px 9px; border: 1px solid #cbd5dc; border-radius: 5px; background: white; color: var(--ink); }
.editor-toolbar button { min-height: 38px; }
.editor-hint { line-height: 1.5; margin: 0 0 10px; }
#editor-content { display: block; width: 100%; min-height: min(58vh, 620px); resize: vertical; padding: 14px; border: 1px solid #cbd5dc; border-radius: 5px; outline: none; background: #fbfdfe; color: #18242d; font: 13px/1.55 ui-monospace, Consolas, monospace; tab-size: 4; white-space: pre; overflow: auto; }
#editor-content:focus { border-color: var(--blue); box-shadow: 0 0 0 2px #1266a81e; }
.editor-dialog .status-message { margin-bottom: 0; }
code { direction: ltr; unicode-bidi: embed; }

:root {
  color-scheme: dark;
  font-family: "Segoe UI", Arial, sans-serif;
  color: #e7edf5;
  background: #111722;
  --ink: #e7edf5;
  --muted: #94a2b7;
  --line: #2b3546;
  --blue: #2871eb;
  --blue-dark: #1e5fce;
  --green: #23b37a;
  --red: #c94b4b;
}
body { min-height: 100vh; background: #111722; color: var(--ink); }
.shell { width: 100%; max-width: none; min-height: 100vh; margin: 0; }
.topbar { height: 70px; position: sticky; top: 0; z-index: 5; padding: 0 26px; background: #0d131d; border-bottom: 1px solid var(--line); }
.brand-mark { background: #172637; color: #28c7df; border: 1px solid #294156; border-radius: 7px; }
.brand-copy strong { color: #43c9e6; font-size: 19px; }
.brand-copy span { color: #8d9bb0; }
.connection { color: #9ba9bb; }
.account-label { color: #9aa9bd; font-size: 12px; }
.quiet-button, .action-button { color: #dce5f0; background: #202b3b; border-color: #344155; }
.quiet-button:hover, .action-button:hover { color: white; background: #29364a; border-color: #4a5d79; }
.primary-button { background: #2871eb; border-color: #2871eb; }
.primary-button:hover { background: #1e5fce; }
.panel-layout { min-height: calc(100vh - 70px); grid-template-columns: 226px minmax(0, 1fr); }
.panel-layout:not(.hidden) { display: grid; }
.sidebar { display: flex; flex-direction: column; gap: 18px; min-height: calc(100vh - 70px); padding: 24px 14px; background: #0d131d; border-inline-end: 1px solid var(--line); }
.sidebar-label { padding: 0 12px; color: #72829a; font-size: 11px; font-weight: 700; }
.side-nav { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 43px; padding: 8px 12px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: #aab7c9; text-align: right; }
.nav-item:hover { background: #182231; color: #eef4fb; }
.nav-item.active { background: #172a3a; border-color: #214354; color: #48d3e3; }
.nav-icon { width: 21px; color: #45c6df; text-align: center; direction: ltr; font-weight: 700; }
.sidebar-foot { display: flex; align-items: center; gap: 9px; margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--line); color: #8695aa; font-size: 12px; }
.sidebar-foot .connection-dot, .console-caption .connection-dot { background: #23b37a; }
.workspace-content { min-width: 0; width: min(1440px, 100%); margin: 0 auto; padding: 0 32px 40px; }
.page-view { min-width: 0; }
.page-heading { padding: 30px 0 22px; }
.page-heading h1 { color: #f2f6fc; font-size: 24px; }
.page-heading p, .section-heading p { color: #91a0b4; }
.summary { border-color: var(--line); }
.summary span:first-child { color: #48d3e3; }
.projects-section, .upload-section { border-color: var(--line); }
.section-heading h2 { color: #e9eff7; }
.projects-table th { color: #93a2b7; border-color: var(--line); }
.projects-table td { border-color: var(--line); }
.projects-table tbody tr:hover { background: #151e2b; }
.project-meta { color: #7e8da2; }
.status-pill.running { color: #43c38a; }
.status-pill.running::before { background: #23b37a; }
.status-pill.failed { color: #ff858c; }
.status-pill.failed::before { background: #ff626d; }
.project-status-cell { min-width: 148px; }
.project-operation { display: block; max-width: 320px; margin-top: 6px; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.project-operation.loading, .operation-status.loading { color: #56d8e7; }
.project-operation.success, .operation-status.success { color: #53d5a0; }
.project-operation.error, .operation-status.error { color: #ff858c; }
.operation-status { margin: 0 0 12px; padding: 10px 13px; border: 1px solid #344155; border-inline-start: 3px solid #56d8e7; border-radius: 4px; background: #141e2b; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.operation-status.success { border-inline-start-color: #35ca92; }
.operation-status.error { border-inline-start-color: #ff6674; }
.muted-note.loading, .muted-note.success, .muted-note.error { display: block; max-width: 820px; margin-top: 12px; padding: 10px 12px; border-inline-start: 3px solid #56d8e7; background: #141e2b; line-height: 1.5; }
.muted-note.success { color: #53d5a0; border-inline-start-color: #35ca92; }
.muted-note.error { color: #ff858c; border-inline-start-color: #ff6674; }
.operation-status.loading::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-inline-end: 9px; border: 2px solid #56d8e744; border-top-color: #56d8e7; border-radius: 50%; vertical-align: 1px; animation: operation-spin .9s linear infinite; }
@keyframes operation-spin { to { transform: rotate(360deg); } }
.projects-table tr.operation-running { background: #182839; }
.status-pill::before { background: #77869a; }
.action-button.run { color: #5bd0a0; border-color: #285845; background: #172a27; }
.action-button.stop { color: #f1bd69; border-color: #5d4930; background: #2a241b; }
.action-button.delete, .danger-button { color: #ffdede; border-color: #884343; background: #9f333b; }
.action-button.edit { color: #66d3e4; border-color: #31586c; background: #192b38; }
.field input, .field select, #password, #email, .editor-toolbar select { color: #e7edf5; background: #111925; border-color: #344155; }
.category-help { color: #b7c6d8; background: #182535; border-color: #39bdd2; }
.consent-field { color: #b7c6d8; }
.consent-field a { color: #59cfe1; }
.dropzone { border-color: #40516a; background: #151e2b; }
.dropzone:hover, .dropzone.dragging { border-color: #3cc7dd; background: #172a38; }
.drop-icon { color: #50cde0; background: #1d3546; }
.empty-state { color: #a1afc2; border-color: #344155; background: #141d29; }
.login-view { width: min(700px, calc(100% - 28px)); margin: clamp(40px, 12vh, 120px) auto; padding: 34px; border-color: #3a485c; border-radius: 7px; background: #202b3b; box-shadow: 0 18px 55px #0005; }
.login-brand { display: flex; justify-content: center; align-items: center; gap: 10px; margin-bottom: 26px; color: #4bcbe1; font-weight: 700; font-size: 20px; }
.login-brand .brand-mark { width: 44px; height: 44px; }
.login-view h1, .login-view > p { text-align: center; }
.login-view h1 { font-size: 24px; }
.login-view > p { color: #9aa9bd; }
.login-view form { max-width: 430px; margin: 0 auto; }
.login-view label { color: #bcc8d8; }
.login-view .primary-button { min-height: 44px; }
.permission-form { background: #172130; }
.users-table td { border-color: var(--line); }
.error-text, .status-message.error { color: #ff8383; }
.server-console { border-top: 1px solid var(--line); padding-top: 22px; }
.console-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.console-toolbar label { color: #a9b6c9; font-size: 13px; }
.console-toolbar select { min-width: min(300px, 100%); min-height: 38px; padding: 7px 10px; border: 1px solid #344155; border-radius: 5px; background: #151e2b; color: #e6edf5; }
.console-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-inline-start: auto; }
.danger-button { min-height: 36px; padding: 7px 12px; border: 1px solid #884343; border-radius: 5px; }
.console-output { margin-bottom: 12px; border: 1px solid #273447; border-radius: 6px; overflow: hidden; background: #0b1119; }
.console-caption { display: flex; align-items: center; gap: 8px; padding: 10px 13px; border-bottom: 1px solid #273447; color: #8fa0b6; font-size: 12px; }
.console-caption .connection-dot { width: 7px; height: 7px; border-radius: 50%; }
.console-output pre { min-height: 280px; max-height: 58vh; overflow: auto; margin: 0; padding: 16px; color: #d5e2ee; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.6 ui-monospace, Consolas, monospace; }
.log-line { color: #c9d7e8; }
.log-line.success { color: #6fdfb1; }
.log-line.warning { color: #ffd078; }
.log-line.error { color: #ff858c; }
.log-line.build { color: #83c9f4; }
.log-line.operation-heading { color: #55d6df; font-weight: 700; }
.data-grid { display: grid; gap: 0; border-top: 1px solid var(--line); }
.data-row { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(180px, 1fr) minmax(120px, auto); align-items: center; gap: 18px; min-height: 62px; border-bottom: 1px solid var(--line); }
.data-row strong { color: #e8eff8; }
.data-row span { color: #9cabc0; font-size: 13px; }
.data-row code { color: #57c7db; text-align: left; }
.database-empty { display: grid; gap: 9px; max-width: 720px; padding: 20px; text-align: right; line-height: 1.6; }
.database-empty strong { color: #e7edf5; }
.settings-list { max-width: 900px; border-top: 1px solid var(--line); }
.settings-list > div { display: flex; justify-content: space-between; gap: 18px; padding: 17px 4px; border-bottom: 1px solid var(--line); }
.settings-list span { color: #a2b0c3; }
.settings-list strong { color: #e2eaf4; text-align: left; font-weight: 550; }
.logs-dialog, .editor-dialog { color: #e7edf5; border-color: #3a485c; background: #1a2432; }
.logs-dialog pre { color: #d8e2ed; background: #0b1119; }
.editor-dialog .dialog-heading p, .editor-hint { color: #9aa9bd; }
.editor-toolbar select { background: #111925; }
#editor-content { background: #0f1722; color: #e4edf6; border-color: #344155; }
@media (max-width: 760px) {
  .provision-form, .permission-form { grid-template-columns: 1fr; }
  .provision-wide { grid-column: auto; }
  .permission-form { padding: 12px; }
  .account-label { display: none; }
  .topbar { height: 62px; padding: 0 14px; }
  .panel-layout { min-height: calc(100vh - 62px); grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 62px; z-index: 4; min-height: 0; padding: 8px; border-inline-end: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .sidebar-label, .sidebar-foot { display: none; }
  .side-nav { display: flex; width: max-content; min-width: 100%; gap: 4px; }
  .nav-item { width: auto; min-height: 40px; white-space: nowrap; font-size: 12px; }
  .nav-icon { width: auto; }
  .workspace-content { padding: 0 16px 28px; }
  .page-heading { padding: 22px 0 16px; }
  .console-toolbar { align-items: stretch; }
  .console-toolbar label { width: 100%; }
  .console-toolbar select { flex: 1; }
  .console-actions { width: 100%; margin-inline-start: 0; }
  .console-actions > button { flex: 1; }
  .data-row { grid-template-columns: 1fr auto; gap: 4px 12px; padding: 11px 0; }
  .data-row span { grid-column: 1; }
  .data-row code { grid-column: 2; grid-row: 1 / 3; }
  .settings-list > div { display: grid; gap: 5px; }
  .settings-list strong { text-align: right; overflow-wrap: anywhere; }
  .login-view { padding: 24px 18px; }
}
@media (max-width: 700px) {
  .shell { width: min(calc(100% - 24px), 560px); }
  .topbar { height: 64px; }
  .page-heading { padding: 24px 0 18px; }
  .page-heading h1 { font-size: 22px; }
  .upload-form { grid-template-columns: 1fr; gap: 10px; }
  .upload-button { width: 100%; }
  .projects-table thead { display: none; }
  .projects-table, .projects-table tbody, .projects-table tr, .projects-table td { display: block; width: 100%; }
  .projects-table tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .projects-table td { border: 0; padding: 4px 0; }
  .projects-table td:first-child { padding-inline-start: 0; }
  .row-actions { margin-top: 7px; }
  .connection { font-size: 11px; }
  .editor-dialog { padding: 13px; }
  .editor-toolbar { grid-template-columns: 1fr auto; }
  .editor-toolbar label { grid-column: 1 / -1; }
  .editor-toolbar select { width: 100%; }
  #editor-content { min-height: 48vh; padding: 10px; font-size: 12px; }
}

/* Hosting-panel layout inspired by the supplied FutureIL reference. */
:root {
  --ink: #e7edf5;
  --muted: #9aa8bb;
  --line: #2a3545;
  --blue: #2869e8;
  --blue-dark: #1f57c8;
  --cyan: #22c8dc;
  --panel: #202b3a;
  --page: #141b27;
}
body { background: var(--page); }
.shell { width: 100%; max-width: none; }
.topbar { height: 56px; gap: 14px; padding: 0 30px; background: #0c121b; }
.brand-mark { width: 32px; height: 32px; font-size: 19px; }
.brand-copy strong { color: #55c8ee; font-size: 19px; }
.brand-copy span { display: none; }
.connection { font-size: 12px; }
.sidebar { min-height: 0; padding: 0 26px; gap: 0; background: #101722; border-bottom: 1px solid var(--line); border-inline-end: 0; }
.sidebar-label, .sidebar-foot { display: none; }
.side-nav { display: flex; gap: 4px; overflow-x: auto; }
.nav-item { position: relative; flex: 0 0 auto; width: auto; min-height: 46px; padding: 0 16px; border: 0; border-radius: 0; color: #a8b5c7; white-space: nowrap; }
.nav-item:hover { background: #172231; }
.nav-item.active { color: var(--cyan); background: transparent; border: 0; }
.nav-item.active::after { content: ""; position: absolute; inset-inline: 10px; bottom: 0; height: 2px; background: var(--cyan); }
.nav-icon { color: currentColor; }
.sidebar { position: sticky; top: 0; z-index: 8; }
.panel-layout { min-height: calc(100vh - 102px); display: block; }
.panel-layout:not(.hidden) { display: block; }
.workspace-content { width: min(1500px, 100%); padding: 0 30px 42px; }
.page-heading { padding: 30px 0 22px; }
.page-heading h1 { font-size: 24px; }
.page-heading p, .section-heading p { color: #91a0b4; }
.projects-section, .upload-section { border-color: var(--line); }
.projects-table tbody tr { background: #18212e; }
.projects-table td { padding: 15px 12px; }
.projects-table th:first-child, .projects-table td:first-child { padding-inline-start: 12px; }
.projects-table tbody tr:hover { background: #1c2938; }
.project-name { color: #edf3fb; }
.empty-state { border-style: solid; border-radius: 5px; }
.login-view { position: relative; width: min(672px, calc(100% - 32px)); margin: clamp(46px, 12vh, 120px) auto; padding: 30px 34px; background: #222e3e; border: 1px solid #3a485c; box-shadow: none; }
.login-brand { justify-content: flex-start; margin: 0 0 22px; font-size: 17px; }
.login-view h1, .login-view > p { text-align: right; }
.login-view h1 { font-size: 24px; }
.login-view > p { margin-bottom: 22px; }
.login-view form { max-width: none; }
.login-view input { min-height: 42px; }
.login-view .primary-button { min-height: 44px; }
.server-console { border-top: 0; padding-top: 0; }
.console-toolbar { justify-content: space-between; margin: 10px 0 16px; }
.console-project-picker { display: flex; align-items: center; gap: 12px; }
.console-toolbar select { min-width: 230px; background: #101722; }
.operation-feed { margin: 0 0 14px; border: 1px solid #314158; border-inline-start: 3px solid #35c5d5; border-radius: 4px; background: #101923; overflow: hidden; }
.operation-feed-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 12px; color: #c8d7e7; background: #182433; font-size: 12px; }
.operation-feed-heading span { color: #56d7ad; }
.operation-feed.failed { border-inline-start-color: #ef6262; }
.operation-feed.failed .operation-feed-heading span { color: #ff8585; }
.operation-feed pre { max-height: 220px; min-height: 54px; margin: 0; padding: 10px 12px; overflow: auto; color: #bed0e2; font: 12px/1.65 Consolas, "Courier New", monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.operation-feed .operation-event-error { color: #ff8585; }
.operation-feed .operation-event-warning { color: #f2c66d; }
.operation-feed .operation-event-success { color: #67d9ae; }
.operation-feed .operation-event-build { color: #81c4f2; }
.console-layout { display: grid; grid-template-columns: minmax(0, 1fr) 286px; gap: 16px; align-items: start; direction: ltr; }
.console-main, .server-details { direction: rtl; }
.console-main { min-width: 0; }
.console-output { min-height: min(62vh, 660px); border: 0; border-radius: 4px; background: #090e14; }
.console-output { box-shadow: inset 3px 0 #39bfd2; }
.console-caption { background: #14202d; border-bottom-color: #24445a; }
.console-caption .connection-dot { background: #54d5a0; box-shadow: 0 0 8px #54d5a055; }
.console-output pre { min-height: min(58vh, 610px); }
.console-main > #console-refresh { margin-top: 10px; }
.server-details { display: grid; gap: 10px; }
.server-details h2 { padding: 0 0 3px; font-size: 16px; }
.server-details > div { display: grid; grid-template-columns: 1fr; gap: 5px; min-height: 76px; padding: 14px; background: #222d3d; border-radius: 4px; }
.server-details span { color: #a7b4c5; font-size: 12px; }
.server-details strong { color: #edf3fb; font-size: 15px; overflow-wrap: anywhere; }
.server-details code { color: #8fcde5; direction: ltr; text-align: right; font-size: 12px; overflow-wrap: anywhere; }
.console-command { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px; border: 1px solid #273447; border-radius: 4px; background: #0d141e; color: #aab9ca; }
.console-command input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); }
.console-command button { width: 30px; height: 30px; border: 0; border-radius: 4px; background: #202c3d; color: #8394aa; }
.console-graphs { display: block; margin-top: 16px; }
.graph-card { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 4px; background: #1b2533; }
.metrics-updated { grid-column: 1 / -1; margin: 0; color: #74d8bd; font-size: 11px; }
.metrics-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.metric-chart { min-width: 0; padding: 15px; border: 1px solid #2d394b; border-radius: 4px; background: #202b3b; }
.metric-chart-heading, .metric-chart-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #aab8ca; font-size: 11px; }
.metric-chart-heading strong { color: #eef4fb; font-size: 13px; font-weight: 600; }
.metric-chart-heading span { color: #c6d3e2; direction: ltr; text-align: left; }
.metric-chart canvas { display: block; width: 100%; height: 132px; margin: 10px 0; }
.metric-chart-footer { justify-content: flex-start; color: #8595a9; }
.graph-heading, .graph-footer { display: flex; justify-content: space-between; gap: 8px; color: #9ba9bc; font-size: 11px; }
.graph-heading strong { color: #e5edf7; font-size: 12px; }
.spark-bars { display: flex; align-items: end; gap: 5px; height: 58px; margin: 13px 0 8px; border-bottom: 1px solid #354256; }
.spark-bars i { flex: 1; min-width: 2px; background: #3a86f7; opacity: .86; border-radius: 2px 2px 0 0; }
.data-grid { border-top: 1px solid var(--line); }
.data-row { padding-inline: 12px; }
.settings-list, .database-empty { border-color: var(--line); }
.file-table, .feature-table { width: 100%; border-collapse: collapse; text-align: right; font-size: 13px; }
.file-table th, .feature-table th { padding: 11px 12px; color: #8595aa; font-size: 11px; font-weight: 550; border-bottom: 1px solid var(--line); }
.file-table td, .feature-table td { padding: 12px; color: #cbd6e5; border-bottom: 1px solid #263243; }
.file-table tbody tr, .feature-table tbody tr { background: #18212e; }
.file-table tbody tr:hover, .feature-table tbody tr:hover { background: #1d2938; }
.file-table td:nth-child(3), .file-table td:nth-child(4) { color: #91a1b6; white-space: nowrap; }
.file-name { color: #79b6f2 !important; }
.icon-button { border: 0; background: transparent; color: #9eacbf; }
.quota-line { display: flex; justify-content: space-between; max-width: 500px; padding: 12px 0; color: #9aa8bb; font-size: 12px; }
.quota-line strong { color: #e4ebf5; }
.database-empty { display: grid; justify-items: center; gap: 10px; padding: 54px 20px; color: #92a3b9; text-align: center; }
.database-empty strong { color: #e2eaf4; font-size: 16px; }
.empty-database-icon { color: var(--cyan); font-size: 28px; }
.feature-table td small { display: block; margin-top: 5px; color: #8595aa; font-size: 11px; }
.feature-table code { display: inline-block; direction: ltr; padding: 4px 7px; border-radius: 3px; background: #101722; color: #a9c9f0; }
.startup-panel { display: grid; gap: 16px; max-width: 980px; }
.startup-panel > label, .settings-panel label { display: grid; gap: 7px; color: #b4c0d0; font-size: 12px; }
.startup-panel input, .settings-panel input, .settings-panel textarea { width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid #303d50; border-radius: 4px; background: #0f1620; color: #d8e2ef; }
.settings-panel select { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid #303d50; border-radius: 4px; background: #0f1620; color: #d8e2ef; }
.startup-panel input[dir="ltr"], .settings-panel input[dir="ltr"] { text-align: left; }
.startup-section { padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.startup-section h2 { margin: 0 0 6px; font-size: 15px; }
.startup-section > p, .warning-panel p { color: #97a6ba; font-size: 12px; }
.startup-variable { display: grid; grid-template-columns: 1fr 1fr 120px; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid #283446; font-size: 12px; }
.startup-variable span { color: #99a8ba; }
.startup-variable code, .setting-line code { direction: ltr; color: #aacbf3; text-align: left; }
.settings-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; margin-bottom: 25px; }
.settings-panel { display: grid; align-content: start; gap: 16px; padding: 18px; border: 1px solid #354256; border-radius: 5px; background: #202b3a; }
.settings-panel h2 { margin: 0; padding-bottom: 10px; border-bottom: 1px solid #39465a; font-size: 13px; letter-spacing: 0; }
.settings-panel textarea { min-height: 76px; resize: vertical; }
.settings-panel .settings-callout { padding-inline-start: 12px; border-inline-start: 3px solid var(--cyan); color: #b7c6d9; font-size: 12px; line-height: 1.5; }
.setting-line { display: flex; justify-content: space-between; gap: 12px; color: #b7c4d4; font-size: 12px; }
.settings-panel .primary-button, .settings-panel .danger-button { justify-self: end; }
.feature-form { max-width: 900px; margin-bottom: 24px; }
.feature-form > label, .schedule-fields > label { display: grid; gap: 7px; color: #b4c0d0; font-size: 12px; }
.feature-form input, .feature-form select { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid #303d50; border-radius: 4px; background: #0f1620; color: #d8e2ef; }
.schedule-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.feature-form .settings-callout { padding: 11px 13px; border-inline-start: 3px solid var(--cyan); background: #182534; color: #bac8d9; font-size: 12px; line-height: 1.6; }
.database-details { max-width: 900px; margin-top: 16px; }
.database-details h2 { color: var(--cyan); font-size: 17px; }
.database-details .setting-line { align-items: center; border-bottom: 1px solid #334155; padding: 8px 0; }
.database-details code { max-width: 70%; overflow-wrap: anywhere; }
.database-details h3 { margin: 8px 0 0; color: #cbd6e5; font-size: 13px; }
.database-env { width: 100%; min-height: 130px; padding: 11px; border: 1px solid #354256; border-radius: 4px; background: #101722; color: #a9d2ff; font: 12px/1.7 ui-monospace, Consolas, monospace; }
.state-chip { justify-self: start; padding: 4px 8px; color: #ffd27b; background: #463817; border-radius: 4px; font-size: 12px; }
.state-chip.is-online { color: #72e1bc; background: #173e38; }
.network-test-result { max-width: 900px; margin: 0 0 16px; color: #aab8ca; font-size: 13px; line-height: 1.6; }
.network-test-result.is-running { color: #61d4e2; }
.network-test-result.is-complete { color: #72e1bc; }
.network-test-result.is-error { color: #ff8383; }
.network-note { padding: 10px 0; color: #91a1b6; font-size: 12px; }
.feature-form { max-width: 900px; margin-bottom: 24px; }
.feature-form > label, .schedule-fields > label { display: grid; gap: 7px; color: #b4c0d0; font-size: 12px; }
.feature-form input, .feature-form select { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid #303d50; border-radius: 4px; background: #0f1620; color: #d8e2ef; }
.schedule-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.feature-form .settings-callout { padding: 11px 13px; border-inline-start: 3px solid var(--cyan); background: #182534; color: #bac8d9; font-size: 12px; line-height: 1.6; }
.database-details { max-width: 900px; margin-top: 16px; }
.database-details h2 { color: var(--cyan); font-size: 17px; }
.database-details .setting-line { align-items: center; border-bottom: 1px solid #334155; padding: 8px 0; }
.database-details code { max-width: 70%; overflow-wrap: anywhere; }
.state-chip { justify-self: start; padding: 4px 8px; color: #ffd27b; background: #463817; border-radius: 4px; font-size: 12px; }
.state-chip.is-online { color: #72e1bc; background: #173e38; }
.network-test-result { max-width: 900px; margin: 0 0 16px; color: #aab8ca; font-size: 13px; line-height: 1.6; }
.network-test-result.is-running { color: #61d4e2; }
.network-test-result.is-complete { color: #72e1bc; }
.network-test-result.is-error { color: #ff8383; }
.network-note { padding: 10px 0; color: #91a1b6; font-size: 12px; }
body.light-theme .feature-form input, body.light-theme .feature-form select { background: #fff; color: #233142; }
body.light-theme .feature-form .settings-callout { background: #e5f4f5; color: #34475a; }
body.light-theme .database-env { color: #223b56; background: #f7f9fb; border-color: #cbd5df; }
.topbar-settings { order: 10; width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; padding: 0; border: 1px solid #344155; border-radius: 5px; background: #202b3b; color: #50d1df; font-size: 20px; }
.topbar-settings:hover, .topbar-settings[data-active="true"] { background: #26374b; border-color: #4a6179; }
.account-settings-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.account-settings-panels > :first-child { grid-column: 1 / -1; }
.account-settings-panels .settings-panel label { gap: 7px; }
.settings-form-status:empty, #preferences-status:empty { display: none; }

body.light-theme { background: #f2f5f8; color: #1c2733; --ink: #1c2733; --muted: #596879; --line: #d4dde6; }
body.light-theme .topbar, body.light-theme .sidebar { background: #fff; border-color: #d4dde6; }
body.light-theme .brand-copy strong, body.light-theme .page-heading h1, body.light-theme .section-heading h2 { color: #1d2a38; }
body.light-theme .brand-copy span, body.light-theme .page-heading p, body.light-theme .section-heading p, body.light-theme .connection, body.light-theme .account-label { color: #5a6878; }
body.light-theme .nav-item { color: #405064; }
body.light-theme .nav-item:hover, body.light-theme .nav-item.active { background: #eaf4fa; color: #125b7a; }
body.light-theme .quiet-button, body.light-theme .action-button, body.light-theme .topbar-settings { color: #253548; background: #fff; border-color: #cbd5df; }
body.light-theme .field input, body.light-theme .field select, body.light-theme .settings-panel input, body.light-theme .settings-panel select, body.light-theme .settings-panel textarea, body.light-theme .editor-toolbar select { color: #1d2b3a; background: #fff; border-color: #becbd8; }
body.light-theme .settings-panel { color: #233246; background: #fff; border-color: #cbd5df; }
body.light-theme .settings-panel h2, body.light-theme .settings-list > div { border-color: #d4dde6; }
body.light-theme .settings-panel label, body.light-theme .settings-panel .settings-callout { color: #405064; }
body.light-theme .feature-form input, body.light-theme .feature-form select { background: #fff; color: #233142; }
body.light-theme .feature-form .settings-callout { background: #e5f4f5; color: #34475a; }
body.light-theme .settings-list span { color: #596879; }
body.light-theme .settings-list strong { color: #243449; }
body.light-theme .projects-table th, body.light-theme .users-table th { color: #536477; }
body.light-theme .projects-table td, body.light-theme .users-table td { border-color: #d4dde6; }
body.light-theme .projects-table tbody tr:hover { background: #eaf1f7; }
body.light-theme .permission-form { background: #fff; }
body.light-theme .user-role-select { color: #1d2b3a; background: #fff; border-color: #becbd8; }
body.light-theme .project-name, body.light-theme .data-row strong { color: #243449; }
body.light-theme .console-output { border-color: #cbd5df; }
body.light-theme .console-caption { color: #526477; background: #e9eff5; border-color: #cbd5df; }
body.light-theme .console-output pre { background: #fff; color: #26374a; }
body.light-theme .operation-status, body.light-theme .operation-feed { background: #fff; border-color: #cbd5df; }
body.light-theme .operation-feed-heading { color: #31445a; background: #e9eff5; }
body.light-theme .server-details > div { background: #fff; border-color: #d4dde6; }
body.light-theme .server-details strong { color: #243449; }
.warning-panel { border-color: #675039; }
.warning-panel h2 { color: #e3bd83; }
button:disabled, input:disabled { cursor: not-allowed; }
.page-view button:disabled { opacity: .58; filter: saturate(.55); }
.logs-dialog, .editor-dialog { background: #1a2432; }
@media (max-width: 760px) {
  .topbar { height: 56px; padding: 0 14px; }
  .sidebar { position: sticky; top: 56px; z-index: 4; padding: 0 8px; }
  .sidebar .side-nav { display: flex; }
  .nav-item { min-height: 44px; padding: 0 12px; }
  .workspace-content { padding: 0 16px 28px; }
  .console-layout { grid-template-columns: 1fr; }
  .console-output, .console-output pre { min-height: 42vh; }
  .server-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .server-details h2 { grid-column: 1 / -1; }
  .metrics-grid { grid-template-columns: 1fr; }
  .settings-panels { grid-template-columns: 1fr; }
  .account-settings-panels > :first-child { grid-column: auto; }
  .feature-table { min-width: 650px; }
  #schedules-content, #backups-content, #network-content, #activity-content { overflow-x: auto; }
}
@media (max-width: 700px) {
  .shell { width: 100%; }
  .topbar { height: 56px; }
  .page-heading { padding: 22px 0 16px; }
  .console-project-picker { width: 100%; align-items: stretch; flex-direction: column; gap: 6px; }
  .console-toolbar select { width: 100%; }
  .console-actions { margin-inline-start: 0; }
  .server-details { grid-template-columns: 1fr 1fr; }
}
.server-picker { display: grid; gap: 10px; padding: 2px 0 20px; }
.server-card { display: grid; grid-template-columns: minmax(220px, 1fr) auto 7px; align-items: center; gap: 18px; min-height: 78px; padding: 10px 14px; border: 1px solid #2c3748; border-radius: 15px; background: #111824; box-shadow: 0 8px 20px #080c1260; }
.server-card::after { content: ""; width: 7px; height: 58px; grid-column: 3; grid-row: 1; border-radius: 8px; background: #bd8530; }
.server-open { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 0; border: 0; background: transparent; color: #edf3fa; text-align: right; }
.server-open strong { min-width: 70px; font-size: 15px; }
.server-icon { display: grid; place-items: center; flex: 0 0 52px; height: 42px; border: 1px solid #334156; border-radius: 24px; background: #192436; color: var(--cyan); font-size: 20px; }
.server-address { margin-inline-start: auto; color: #7f91a9; font-size: 12px; direction: ltr; }
.server-metrics { display: flex; align-items: center; gap: clamp(16px, 3vw, 42px); color: #d4deeb; }
.server-status { color: #9eaabd; font-size: 12px; white-space: nowrap; }
.server-status.running { color: #47cf99; }
.server-metric { display: grid; gap: 4px; min-width: 92px; color: #dce6f2; text-align: center; font-size: 12px; white-space: nowrap; }
.server-metric small { color: #8392a7; font-size: 10px; }
.server-metric strong { font-weight: 500; }
.server-metric strong, .server-details [dir="ltr"] { direction: ltr; unicode-bidi: isolate; }
.file-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 0 16px; }
.breadcrumb { display: flex; align-items: center; flex: 1; flex-wrap: wrap; gap: 4px; color: #8ea1ba; font-size: 13px; }
.breadcrumb-button { padding: 4px 2px; border: 0; background: transparent; color: #8fc8f7; }
.breadcrumb-button:hover, .file-action:hover, .file-open:hover { color: #fff; text-decoration: underline; }
.file-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 12px; }
.file-action { padding: 2px; border: 0; background: transparent; color: #8fc8f7; text-decoration: none; font: inherit; }
.danger-link { color: #ff8585; }
.file-menu { position: relative; }
.file-menu-trigger { display: grid; place-items: center; width: 34px; height: 32px; border: 1px solid transparent; border-radius: 5px; color: #c4d2e3; cursor: pointer; font-size: 22px; line-height: 1; list-style: none; }
.file-menu-trigger::-webkit-details-marker { display: none; }
.file-menu[open] .file-menu-trigger, .file-menu-trigger:hover { border-color: #40516a; background: #202d40; color: white; }
.file-menu-options { position: absolute; z-index: 5; inset-inline-end: 0; top: calc(100% + 4px); min-width: 176px; display: grid; padding: 4px; border: 1px solid #3a4960; border-radius: 5px; background: #202a3a; box-shadow: 0 8px 22px #0005; }
.file-menu-option, .file-menu-options button { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 3px; background: transparent; color: #d9e4f1; font: inherit; text-align: right; text-decoration: none; white-space: nowrap; }
.file-menu-option:hover, .file-menu-options button:hover { background: #2c3a4f; color: white; }
.file-menu-options .danger-link { color: #ff8585; }
.file-menu-options .danger-link:hover { background: #512f39; }
.file-open { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: right; }
.file-browser-list, .feature-list { display: grid; border-top: 1px solid var(--line); }
.feature-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #18212e; }
.feature-row > div { display: grid; gap: 5px; min-width: 0; }
.feature-row strong { color: #e8eff7; overflow-wrap: anywhere; }
.feature-row > div span, .muted-note { color: #93a2b6; font-size: 12px; }
.feature-meta { flex: 0 0 auto; color: #9baac0; font-size: 12px; }
.muted-note { margin-top: 12px; line-height: 1.55; }
.network-test-result { max-width: 1040px; margin: 0 0 26px; }
.network-test-disclosure { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 20px; max-width: 1040px; margin: -12px 0 18px; padding: 12px 14px; border: 1px solid #765e36; border-inline-start: 3px solid #e6b84e; border-radius: 6px; background: #29271f; color: #f1dfb7; font-size: 12px; line-height: 1.6; }
.network-test-disclosure label { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; }
.network-test-disclosure input { flex: 0 0 auto; width: 16px; height: 16px; margin: 2px 0 0; accent-color: #43d9c3; }
.network-test-disclosure a { flex: 0 0 auto; color: #71dfe7; text-decoration: underline; text-underline-offset: 2px; }
.page-heading #network-test-button:disabled { opacity: .48; cursor: not-allowed; }
.speedtest-panel { overflow: hidden; border: 1px solid #33435a; border-radius: 8px; background: linear-gradient(140deg, #1d2939 0%, #172332 52%, #192539 100%); box-shadow: 0 16px 44px #050a123d; }
.speedtest-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px 12px; }
.speedtest-kicker { display: block; margin-bottom: 5px; color: #55d8e8; font-size: 10px; font-weight: 750; letter-spacing: 1px; direction: ltr; text-align: right; }
.speedtest-header h2 { color: #eff6ff; font-size: 17px; }
.speedtest-state { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid #3a4b60; border-radius: 999px; background: #111b29; color: #a9bad0; font-size: 12px; white-space: nowrap; }
.speedtest-state-dot { width: 8px; height: 8px; border-radius: 50%; background: #8999ae; }
.speedtest-panel.is-running .speedtest-state { color: #68e0ec; border-color: #247789; }
.speedtest-panel.is-running .speedtest-state-dot { background: #31d6e4; box-shadow: 0 0 0 4px #31d6e426; animation: speedtest-pulse 1.2s ease-in-out infinite; }
.speedtest-panel.is-complete .speedtest-state { color: #78e6bd; border-color: #286b5b; }
.speedtest-panel.is-complete .speedtest-state-dot { background: #42d49c; }
.speedtest-panel.is-error .speedtest-state { color: #ff9292; border-color: #74424d; }
.speedtest-panel.is-error .speedtest-state-dot { background: #fb6868; }
.speedtest-progress { height: 3px; margin: 0 22px; overflow: hidden; border-radius: 5px; background: #2b394c; }
.speedtest-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #25c9e6, #42e1b0, #b8ee59); transition: width .45s ease; }
.speedtest-panel.is-running .speedtest-progress span { box-shadow: 0 0 12px #37d9cb; }
.speedtest-stages { display: flex; justify-content: center; gap: clamp(12px, 4vw, 46px); padding: 12px 14px 2px; color: #74869e; font-size: 11px; }
.speedtest-stages span { position: relative; transition: color .2s ease; }
.speedtest-stages span.is-active { color: #74e0e5; }
.speedtest-stages span.is-done { color: #80deb9; }
.speedtest-layout { display: grid; grid-template-columns: minmax(260px, .95fr) minmax(300px, 1.05fr); align-items: center; gap: 24px; padding: 4px 30px 18px; }
.speedtest-gauge-wrap { position: relative; width: min(100%, 390px); height: 258px; margin: 0 auto; }
.speedtest-gauge { position: absolute; inset: 4px 0 auto; width: 100%; height: 234px; overflow: visible; }
.gauge-track, .gauge-fill { fill: none; stroke-width: 11; stroke-linecap: round; }
.gauge-track { stroke: #344256; }
.gauge-fill { stroke: url(#speedtest-gradient); stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .55s ease; filter: drop-shadow(0 0 5px #38d9c455); }
.gauge-tick { fill: none; stroke: #64748a; stroke-width: 2; stroke-linecap: round; }
.gauge-needle { transform-box: view-box; transform-origin: 160px 168px; transition: transform .65s cubic-bezier(.2,.8,.2,1); }
.gauge-needle path { fill: none; stroke: #f1f7fc; stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 1px 4px #0008); }
.gauge-needle circle { fill: #e6f4f6; stroke: #263a4e; stroke-width: 4; }
.speedtest-reading { position: absolute; inset-inline: 0; top: 150px; display: flex; align-items: baseline; justify-content: center; gap: 8px; direction: ltr; }
.speedtest-reading strong { color: #f4f9ff; font-size: 37px; font-weight: 550; font-variant-numeric: tabular-nums; }
.speedtest-reading span { color: #a7bad0; font-size: 14px; }
.speedtest-reading-label { position: absolute; top: 198px; inset-inline: 0; color: #879ab1; font-size: 12px; text-align: center; }
.speedtest-metrics { display: grid; gap: 10px; }
.speedtest-metric { min-height: 70px; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; padding: 10px 13px; border: 1px solid #34445a; border-radius: 6px; background: #202d3e; }
.metric-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 6px; background: #142334; color: #32d5df; font-size: 23px; }
.download-metric .metric-icon { color: #47dfbf; }
.upload-metric .metric-icon { color: #c78cff; }
.speedtest-metric > div { display: grid; gap: 3px; }
.speedtest-metric .metric-label { color: #a8b7ca; font-size: 12px; }
.speedtest-metric strong { color: #f0f5fc; font-size: 20px; font-variant-numeric: tabular-nums; }
.speedtest-metric small { color: #8294ab; font-size: 11px; direction: ltr; }
.latency-metric { border-inline-start: 3px solid #f3be43; }
.download-metric { border-inline-start: 3px solid #3dd9bd; }
.upload-metric { border-inline-start: 3px solid #b978f3; }
.speedtest-footer { display: flex; justify-content: space-between; gap: 12px; padding: 11px 22px; border-top: 1px solid #2d3b4e; color: #8598af; font-size: 11px; }
.speedtest-footer span:last-child { direction: ltr; }
.speedtest-error { padding: 10px 22px 16px; color: #ff8989; font-size: 13px; }
@keyframes speedtest-pulse { 50% { opacity: .45; box-shadow: 0 0 0 7px #31d6e410; } }
@media (max-width: 700px) {
  .network-test-disclosure { flex-direction: column; margin-top: -8px; }
  .speedtest-header { padding: 16px 14px 12px; align-items: flex-start; }
  .speedtest-header h2 { font-size: 15px; }
  .speedtest-state { font-size: 10px; }
  .speedtest-progress { margin-inline: 14px; }
  .speedtest-stages { gap: 14px; font-size: 10px; }
  .speedtest-layout { grid-template-columns: 1fr; gap: 2px; padding: 2px 14px 14px; }
  .speedtest-gauge-wrap { height: 235px; max-width: 360px; }
  .speedtest-gauge { height: 214px; }
  .speedtest-reading { top: 137px; }
  .speedtest-reading-label { top: 182px; }
  .speedtest-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .speedtest-metric { min-height: 90px; grid-template-columns: 1fr; justify-items: center; gap: 4px; padding: 8px 4px; text-align: center; }
  .speedtest-metric > div { justify-items: center; }
  .speedtest-metric strong { font-size: 15px; }
  .metric-icon { width: 30px; height: 30px; font-size: 19px; }
  .speedtest-metric small { display: none; }
  .speedtest-footer { padding-inline: 14px; flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .server-card { grid-template-columns: minmax(0, 1fr) 7px; gap: 8px; padding: 10px; }
  .server-card::after { grid-column: 2; }
  .server-open { grid-column: 1; grid-row: 1; }
  .server-metrics { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; gap: 8px; padding-inline: 4px; }
  .server-metric { min-width: 0; font-size: 10px; }
  .server-address { display: none; }
  .file-toolbar { align-items: stretch; }
  .breadcrumb { flex: 1 0 100%; padding: 5px 0; }
}

.editor-toolbar { grid-template-columns: auto minmax(160px, 1fr) auto auto; }
.editor-searchbar { display: flex; align-items: center; gap: 7px; margin: 0 0 10px auto; width: min(100%, 470px); direction: ltr; }
.editor-searchbar.hidden { display: none; }
.editor-searchbar input { flex: 1; min-width: 0; height: 36px; padding: 6px 10px; border: 1px solid #40516a; border-radius: 4px; color: #e7edf5; background: #111925; font: inherit; }
.editor-search-count { min-width: 48px; color: #a9b8cc; font: 12px ui-monospace, Consolas, monospace; text-align: center; }
.editor-searchbar button { min-width: 34px; min-height: 34px; padding: 4px 8px; }
.editor-searchbar button:disabled { opacity: .42; cursor: not-allowed; }
.editor-workspace { display: grid; grid-template-columns: auto minmax(0, 1fr); height: min(58vh, 620px); min-height: 280px; overflow: hidden; direction: ltr; border: 1px solid #344155; border-radius: 5px; background: #0d1521; }
.editor-gutter, .editor-highlight, #editor-content { box-sizing: border-box; margin: 0; font: 13px/1.55 ui-monospace, Consolas, monospace; tab-size: 4; }
.editor-gutter { min-width: 48px; padding: 14px 10px; overflow: hidden; border-right: 1px solid #273548; color: #71839b; background: #111b29; text-align: right; user-select: none; white-space: pre; }
.editor-code-pane { position: relative; min-width: 0; height: 100%; overflow: hidden; }
.editor-highlight { position: absolute; inset: 0; width: max-content; min-width: 100%; padding: 14px; overflow: visible; color: #d9e3f0; pointer-events: none; white-space: pre; will-change: transform; }
#editor-content { position: absolute; z-index: 1; inset: 0; display: block; width: 100%; height: 100%; min-height: 0; resize: none; padding: 14px; overflow: auto; border: 0; border-radius: 0; outline: 0; color: transparent; background: transparent; font-size: 13px; line-height: 1.55; white-space: pre; -webkit-text-fill-color: transparent; caret-color: #f3f7ff; }
#editor-content:focus { border: 0; box-shadow: none; }
#editor-content::selection { color: #fff; background: #3985efb3; -webkit-text-fill-color: #fff; }
.syntax-keyword { color: #ff9278; }
.syntax-string { color: #a8dca5; }
.syntax-comment { color: #8395aa; font-style: italic; }
.syntax-number { color: #f2b879; }
.syntax-builtin, .syntax-decorator { color: #d2a6ff; }
.syntax-constant { color: #ffb86c; }
.syntax-function { color: #82cfff; }
.syntax-property { color: #9bd9e8; }
.syntax-punctuation { color: #b8c7d9; }
body.light-theme .editor-searchbar input { color: #243449; background: #fff; border-color: #becbd8; }
body.light-theme .editor-search-count { color: #536477; }
body.light-theme .editor-workspace { border-color: #cbd5df; background: #fbfdff; }
body.light-theme .editor-gutter { color: #8291a3; border-color: #d7e0e9; background: #f0f4f8; }
body.light-theme .editor-highlight { color: #26374a; }
body.light-theme #editor-content { caret-color: #1e293b; }
body.light-theme #editor-content::selection { color: #172536; background: #8bbcffb3; -webkit-text-fill-color: #172536; }
body.light-theme .syntax-keyword { color: #c2413b; }
body.light-theme .syntax-string { color: #267345; }
body.light-theme .syntax-comment { color: #728095; }
body.light-theme .syntax-number { color: #a65d0a; }
body.light-theme .syntax-builtin, body.light-theme .syntax-decorator { color: #7540a6; }
body.light-theme .syntax-constant { color: #a24e0c; }
body.light-theme .syntax-function { color: #086f9d; }
body.light-theme .syntax-property { color: #087c8d; }
body.light-theme .syntax-punctuation { color: #526477; }
@media (max-width: 760px) {
  .editor-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  .editor-toolbar label { grid-column: 1 / -1; }
  .editor-toolbar select { width: 100%; }
  .editor-workspace { height: 52vh; min-height: 240px; }
  .editor-gutter { min-width: 40px; padding-inline: 7px; }
  .editor-gutter, .editor-highlight, #editor-content { font-size: 12px; }
  .editor-searchbar { width: 100%; }
}
