:root {
    --ms-ink: #17202e;
    --ms-muted: #6c7688;
    --ms-line: #e3e8ef;
    --ms-panel: #ffffff;
    --ms-bg: #f3f6fa;
    --ms-blue: #2764ff;
    --ms-blue-dark: #1748c7;
    --ms-green: #20b486;
    --ms-red: #d34156;
    --ms-code: #101827;
}

.ms-page { max-width: 1480px; margin: 0 auto; padding: 28px 24px 72px; color: var(--ms-ink); }
.ms-hero { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; overflow: hidden; padding: 22px 28px; border-radius: 24px 24px 0 0; color: white; background: radial-gradient(circle at 72% 15%, rgba(78, 126, 255, .7), transparent 32%), linear-gradient(125deg, #101b38 0%, #172f73 55%, #1f57e2 100%); }
.ms-hero::after { content: ""; position: absolute; width: 280px; height: 280px; right: 18%; bottom: -245px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; box-shadow: 0 0 0 40px rgba(255,255,255,.035), 0 0 0 80px rgba(255,255,255,.025); }
.ms-hero-copy { position: relative; z-index: 1; max-width: 760px; }
.ms-kicker, .ms-eyebrow { display: block; margin-bottom: 6px; color: #76a1ff; font: 700 .65rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .13em; text-transform: uppercase; }
.ms-hero h1 { margin: 0 0 7px; font-size: clamp(1.75rem, 3vw, 2.65rem); line-height: 1.02; letter-spacing: -.045em; font-weight: 800; }
.ms-hero p { margin: 0; max-width: 720px; color: #cdd8f1; font-size: .88rem; line-height: 1.45; }
.ms-auth-card { position: relative; z-index: 1; flex: 0 0 270px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 3px 10px; padding: 11px 14px; border: 1px solid rgba(255,255,255,.16); border-radius: 12px; background: rgba(9, 18, 43, .48); backdrop-filter: blur(18px); }
.ms-auth-card strong, .ms-auth-card small { display: block; }
.ms-auth-card strong { font-size: .84rem; }
.ms-auth-card small { overflow: hidden; color: #aebbd8; font-size: .71rem; text-overflow: ellipsis; }
.ms-status-dot, .ms-live-dot { width: 9px; height: 9px; border-radius: 50%; background: #8c98ab; box-shadow: 0 0 0 4px rgba(140,152,171,.13); }
.ms-status-dot.is-online, .ms-live-dot { background: #27d59f; box-shadow: 0 0 0 4px rgba(39,213,159,.14); }
.ms-auth-link { grid-column: 2; color: #8eb1ff; font-size: .74rem; font-weight: 700; text-decoration: none; }
.ms-alert { position: sticky; top: 10px; z-index: 20; margin: -8px auto 8px; width: max-content; max-width: 90%; padding: 10px 17px; border-radius: 9px; color: white; background: var(--ms-ink); box-shadow: 0 10px 30px rgba(18,29,50,.23); font-size: .85rem; }
.ms-alert.is-error { background: var(--ms-red); }

.ms-shell { display: grid; grid-template-columns: 254px minmax(0, 1fr); min-height: 740px; border: 1px solid #dbe2ec; border-top: 0; border-radius: 0 0 24px 24px; background: var(--ms-panel); box-shadow: 0 28px 70px rgba(29, 44, 78, .12); overflow: hidden; }
.ms-projects-panel, .ms-endpoints-panel { min-width: 0; background: #f7f9fc; border-right: 1px solid var(--ms-line); }
.ms-projects-panel { display: flex; flex-direction: column; }
.ms-panel-title { display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 0 17px; border-bottom: 1px solid var(--ms-line); color: #6f7a8c; font-size: .7rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.ms-icon-button { display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid #cfd7e3; border-radius: 8px; color: #45536b; background: white; font-size: 1.2rem; line-height: 1; }
.ms-icon-button:hover { border-color: var(--ms-blue); color: var(--ms-blue); }
.ms-project-list { flex: 1; padding: 10px; }
.ms-project-item { display: grid; grid-template-columns: 32px minmax(0,1fr); gap: 9px; align-items: center; width: 100%; padding: 11px 10px; border: 0; border-radius: 10px; color: var(--ms-ink); background: transparent; text-align: left; }
.ms-project-item:hover { background: #edf2fa; }
.ms-project-item.is-active { color: white; background: var(--ms-blue); box-shadow: 0 8px 20px rgba(39,100,255,.23); }
.ms-project-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--ms-blue); background: #e6edff; font: 700 .75rem ui-monospace, monospace; }
.ms-project-item.is-active .ms-project-icon { color: white; background: rgba(255,255,255,.17); }
.ms-project-item strong, .ms-project-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-project-item strong { font-size: .82rem; }
.ms-project-item small { margin-top: 2px; color: #8590a2; font-size: .67rem; }
.ms-project-item.is-active small { color: #c9d7ff; }
.ms-projects-foot { display: flex; gap: 9px; align-items: flex-start; padding: 14px 17px; border-top: 1px solid var(--ms-line); color: #8993a3; font-size: .67rem; line-height: 1.45; }
.ms-cloud-icon { color: #7d8ca4; font-size: .95rem; }

.ms-main { min-width: 0; background: var(--ms-bg); }
.ms-empty { display: grid; place-items: center; align-content: center; min-height: 650px; padding: 42px; text-align: center; }
.ms-empty-mark { display: grid; place-items: center; width: 78px; height: 78px; margin-bottom: 18px; border: 1px solid #ced8e7; border-radius: 21px; color: var(--ms-blue); background: white; font: 800 1.3rem ui-monospace, monospace; box-shadow: 0 16px 35px rgba(42,60,94,.1); }
.ms-empty h2 { margin: 0 0 8px; font-size: 1.4rem; font-weight: 800; }
.ms-empty p { max-width: 470px; margin: 0 0 20px; color: var(--ms-muted); }
.ms-project-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; min-height: 92px; padding: 18px 24px; border-bottom: 1px solid var(--ms-line); background: white; }
.ms-project-head label { display: block; color: #8993a3; font-size: .67rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ms-project-name-row { display: flex; align-items: center; gap: 10px; }
.ms-project-name-row input { width: min(460px, 52vw); padding: 3px 0; border: 0; border-bottom: 1px solid transparent; color: var(--ms-ink); background: transparent; font-size: 1.35rem; font-weight: 800; outline: none; }
.ms-project-name-row input:focus { border-color: var(--ms-blue); }
.ms-sync-badge { padding: 4px 8px; border-radius: 99px; color: #23775f; background: #e4f8f1; font-size: .64rem; font-weight: 800; white-space: nowrap; }
.ms-sync-badge.is-local { color: #7b5e17; background: #fff5d7; }
.ms-url-bar { display: flex; align-items: center; gap: 11px; min-height: 49px; padding: 8px 24px; border-bottom: 1px solid var(--ms-line); background: #fbfcfe; }
.ms-url-bar code { overflow: hidden; flex: 1; color: #385172; font-size: .77rem; text-overflow: ellipsis; white-space: nowrap; }
.ms-copy-button { border: 0; color: var(--ms-blue); background: transparent; font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.ms-editor-grid { display: grid; grid-template-columns: 258px minmax(0, 1fr); min-height: 650px; }
.ms-endpoint-list { padding: 10px; }
.ms-endpoint-item { width: 100%; margin-bottom: 6px; padding: 11px; border: 1px solid transparent; border-radius: 10px; background: transparent; text-align: left; }
.ms-endpoint-item:hover { background: white; }
.ms-endpoint-item.is-active { border-color: #dbe4f2; background: white; box-shadow: 0 6px 18px rgba(35,52,83,.07); }
.ms-endpoint-top { display: flex; align-items: center; gap: 7px; }
.ms-endpoint-item strong { overflow: hidden; flex: 1; font-size: .77rem; text-overflow: ellipsis; white-space: nowrap; }
.ms-endpoint-item code { display: block; overflow: hidden; margin-top: 7px; color: #7b8799; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.ms-method { min-width: 43px; padding: 3px 5px; border-radius: 5px; color: #176b53; background: #dff7ee; font: 800 .58rem ui-monospace, monospace; text-align: center; }
.ms-method[data-method="POST"] { color: #8a5c0b; background: #fff2cd; }
.ms-method[data-method="PUT"], .ms-method[data-method="PATCH"] { color: #4d55a5; background: #e8e9ff; }
.ms-method[data-method="DELETE"] { color: #a63245; background: #ffe5ea; }
.ms-method[data-method="ANY"] { color: #546173; background: #e8edf3; }
.ms-count { color: #9aa3b1; font-size: .62rem; }
.ms-editor { min-width: 0; background: var(--ms-bg); }
.ms-editor-empty { display: grid; place-items: center; min-height: 430px; color: #8d97a6; font-size: .86rem; }
.ms-section { margin: 16px; padding: 20px; border: 1px solid var(--ms-line); border-radius: 14px; background: white; box-shadow: 0 5px 16px rgba(29,46,76,.035); }
.ms-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.ms-section-head h2 { margin: 0; font-size: 1.02rem; font-weight: 800; }
.ms-eyebrow { margin-bottom: 4px; color: #8995aa; font-size: .6rem; }
.ms-actions { display: flex; align-items: center; gap: 8px; }
.ms-button { padding: 8px 13px; border: 1px solid transparent; border-radius: 8px; font-size: .75rem; font-weight: 800; transition: .15s ease; }
.ms-button:hover { transform: translateY(-1px); }
.ms-button-primary { color: white; background: var(--ms-blue); box-shadow: 0 5px 12px rgba(39,100,255,.18); }
.ms-button-primary:hover { background: var(--ms-blue-dark); }
.ms-button-ghost { border-color: #d7deea; color: #536078; background: white; }
.ms-button-danger-ghost { border-color: #f0d6dc; color: var(--ms-red); background: #fffafb; }
.ms-text-danger { padding: 4px; border: 0; color: var(--ms-red); background: transparent; font-size: .7rem; font-weight: 700; }
.ms-endpoint-row, .ms-settings-row, .ms-variant-grid { display: flex; align-items: end; gap: 12px; }
.ms-settings-row { align-items: center; margin-top: 13px; }
.ms-field { display: grid; gap: 6px; min-width: 140px; }
.ms-field-grow { flex: 1; }
.ms-field-small { min-width: 90px; max-width: 110px; }
.ms-field-method { min-width: 104px; }
.ms-field > span { color: #778294; font-size: .65rem; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.ms-field input, .ms-field select, .ms-field textarea { width: 100%; border: 1px solid #d6deea; border-radius: 8px; color: #26344b; background: #fbfcfe; font-size: .78rem; outline: none; }
.ms-field input, .ms-field select { min-height: 38px; padding: 8px 10px; }
.ms-field textarea { padding: 11px; resize: vertical; font: .75rem/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
.ms-field input:focus, .ms-field select:focus, .ms-field textarea:focus { border-color: #7fa3ff; box-shadow: 0 0 0 3px rgba(39,100,255,.08); }
.ms-toggle { display: flex; align-items: center; gap: 8px; margin-right: auto; color: #667287; font-size: .73rem; font-weight: 700; }
.ms-toggle input { position: absolute; opacity: 0; }
.ms-toggle span { position: relative; width: 34px; height: 19px; border-radius: 20px; background: #cdd5e1; }
.ms-toggle span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: white; transition: .15s; }
.ms-toggle input:checked + span { background: var(--ms-blue); }
.ms-toggle input:checked + span::after { transform: translateX(15px); }
.ms-variant-tabs { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 10px; border-bottom: 1px solid var(--ms-line); }
.ms-variant-tab { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; padding: 7px 10px; border: 1px solid #dce3ed; border-radius: 8px; color: #68758a; background: #f9fafc; font-size: .71rem; font-weight: 700; }
.ms-variant-tab.is-active { border-color: #9ab5ff; color: var(--ms-blue); background: #eef3ff; }
.ms-status-code { font: 800 .64rem ui-monospace, monospace; }
.ms-status-code.is-error { color: var(--ms-red); }
.ms-variant-grid { flex-wrap: wrap; margin-top: 16px; }
.ms-default-check { display: flex; align-items: center; gap: 7px; margin: 13px 0; color: #667287; font-size: .73rem; font-weight: 700; }
.ms-response-editor { overflow: hidden; border: 1px solid #d6deea; border-radius: 10px; background: white; }
.ms-payload-tabs { display: flex; gap: 3px; padding: 6px 7px 0; border-bottom: 1px solid #d6deea; background: #f6f8fb; }
.ms-payload-tab { position: relative; padding: 9px 14px 10px; border: 0; color: #7a8698; background: transparent; font-size: .7rem; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.ms-payload-tab::after { content: ""; position: absolute; right: 10px; bottom: -1px; left: 10px; height: 2px; border-radius: 2px 2px 0 0; background: transparent; }
.ms-payload-tab:hover { color: #42516a; }
.ms-payload-tab.is-active { color: var(--ms-blue); }
.ms-payload-tab.is-active::after { background: var(--ms-blue); }
.ms-payload-panel { padding: 0; background: var(--ms-code); }
.ms-payload-panel[hidden] { display: none; }
.ms-payload-panel textarea { display: block; width: 100%; min-height: 340px; padding: 16px; resize: vertical; border: 0; color: #dce6f4; background: var(--ms-code); outline: none; font: .78rem/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; }
.ms-payload-panel#msResponsePanelHeaders { padding: 12px; background: white; }
.ms-payload-panel#msResponsePanelHeaders textarea { min-height: 250px; border: 1px solid #d6deea; border-radius: 8px; color: #26344b; background: #fbfcfe; }
.ms-response-editor .CodeMirror { height: 360px; color: #dce6f4; background: var(--ms-code); font: .78rem/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; }
.ms-response-editor .CodeMirror-gutters { border-right-color: #25334a; background: #0c1421; }
.ms-response-editor .CodeMirror-linenumber { color: #526079; }
.ms-response-editor .CodeMirror-cursor { border-left-color: #f2f6ff; }
.ms-response-editor .CodeMirror-selected { background: #263a5d; }
.ms-response-editor .CodeMirror-focused .CodeMirror-selected { background: #304a75; }
.ms-response-editor .CodeMirror-matchingbracket { color: #ffffff !important; background: rgba(107, 147, 255, .28); }
.ms-response-editor .cm-s-default .cm-property,
.ms-response-editor .cm-s-default .cm-attribute { color: #8fbcff; }
.ms-response-editor .cm-s-default .cm-string,
.ms-response-editor .cm-s-default .cm-string-2 { color: #a9dc76; }
.ms-response-editor .cm-s-default .cm-number { color: #ffd580; }
.ms-response-editor .cm-s-default .cm-atom,
.ms-response-editor .cm-s-default .cm-keyword { color: #c7a0ff; }
.ms-response-editor .cm-s-default .cm-tag,
.ms-response-editor .cm-s-default .cm-bracket { color: #ff7396; }
.ms-response-editor .cm-s-default .cm-def,
.ms-response-editor .cm-s-default .cm-variable { color: #73daca; }
.ms-response-editor .cm-s-default .cm-comment { color: #718096; font-style: italic; }
.ms-input-suffix { position: relative; }
.ms-input-suffix i { position: absolute; top: 11px; right: 9px; color: #919baa; font: normal .67rem ui-monospace, monospace; }
.ms-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 13px; }
.ms-form-foot p { margin: 0; color: #8993a3; font-size: .67rem; }
.ms-form-foot code { color: #52647e; }
.ms-no-variants { padding: 28px; color: #8a95a6; text-align: center; }
.ms-logs { display: grid; gap: 7px; }
.ms-log { border: 1px solid #e0e6ee; border-radius: 9px; background: #fbfcfe; }
.ms-log summary { display: grid; grid-template-columns: 48px minmax(0,1fr) auto auto auto; gap: 9px; align-items: center; padding: 10px 12px; cursor: pointer; list-style: none; }
.ms-log summary::-webkit-details-marker { display: none; }
.ms-log-path { overflow: hidden; font: .7rem ui-monospace, monospace; text-overflow: ellipsis; white-space: nowrap; }
.ms-log-meta { color: #8a94a4; font-size: .65rem; }
.ms-log-status { font: 800 .67rem ui-monospace, monospace; }
.ms-log-status.is-error { color: var(--ms-red); }
.ms-log-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 12px 12px; }
.ms-log-body div { min-width: 0; }
.ms-log-body strong { display: block; margin-bottom: 5px; color: #7c8798; font-size: .61rem; text-transform: uppercase; }
.ms-log-body pre { overflow: auto; max-height: 220px; margin: 0; padding: 10px; border-radius: 7px; color: #cbd7e8; background: #172235; font: .66rem/1.45 ui-monospace, monospace; white-space: pre-wrap; word-break: break-all; }
.ms-log-empty { padding: 22px; color: #8c96a5; background: #f9fafc; text-align: center; font-size: .76rem; }

.ms-guide { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 28px; overflow: hidden; border: 1px solid var(--ms-line); border-radius: 18px; background: var(--ms-line); }
.ms-guide > div { padding: 27px; background: white; }
.ms-guide-number { color: var(--ms-blue); font: 800 .68rem ui-monospace, monospace; }
.ms-guide h2 { margin: 13px 0 7px; font-size: .97rem; font-weight: 800; }
.ms-guide p { margin: 0; color: var(--ms-muted); font-size: .77rem; line-height: 1.55; }
.ms-dialog { width: min(520px, calc(100% - 28px)); padding: 0; border: 0; border-radius: 17px; box-shadow: 0 30px 90px rgba(9,21,45,.3); }
.ms-dialog::backdrop { background: rgba(13,24,44,.55); backdrop-filter: blur(3px); }
.ms-dialog form { position: relative; display: grid; gap: 16px; padding: 27px; }
.ms-dialog h2 { margin: -10px 0 0; font-size: 1.35rem; font-weight: 800; }
.ms-dialog-close { position: absolute; top: 13px; right: 15px; border: 0; color: #8a95a6; background: transparent; font-size: 1.5rem; }

@media (max-width: 1050px) {
    .ms-page { padding: 16px 12px 54px; }
    .ms-shell { grid-template-columns: 210px minmax(0,1fr); }
    .ms-editor-grid { grid-template-columns: 210px minmax(0,1fr); }
    .ms-variant-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
    .ms-field-small { max-width: none; }
}

@media (max-width: 760px) {
    .ms-hero { align-items: flex-start; flex-direction: column; gap: 11px; padding: 15px 16px; border-radius: 18px 18px 0 0; }
    .ms-hero h1 { margin-bottom: 0; font-size: 1.55rem; line-height: 1.06; }
    .ms-hero p, .ms-auth-card small { display: none; }
    .ms-auth-card { width: 100%; flex-basis: auto; }
    .ms-shell { display: block; border-radius: 0 0 18px 18px; }
    .ms-projects-panel { border-right: 0; }
    .ms-project-list { display: flex; overflow-x: auto; gap: 7px; }
    .ms-project-item { flex: 0 0 190px; }
    .ms-projects-foot { display: none; }
    .ms-project-head { align-items: flex-start; flex-direction: column; }
    .ms-project-name-row { align-items: flex-start; flex-direction: column; gap: 7px; }
    .ms-project-name-row input { width: min(80vw, 390px); }
    .ms-editor-grid { display: block; }
    .ms-endpoints-panel { border-right: 0; border-bottom: 1px solid var(--ms-line); }
    .ms-endpoint-list { display: flex; overflow-x: auto; }
    .ms-endpoint-item { flex: 0 0 190px; }
    .ms-section { margin: 10px; padding: 15px; }
    .ms-section-head, .ms-form-foot { align-items: flex-start; flex-direction: column; }
    .ms-endpoint-row, .ms-settings-row { align-items: stretch; flex-direction: column; }
    .ms-variant-grid { grid-template-columns: repeat(2, 1fr); }
    .ms-log summary { grid-template-columns: 46px minmax(0,1fr) auto; }
    .ms-log summary .ms-log-meta:nth-last-child(-n+2) { display: none; }
    .ms-log-body { grid-template-columns: 1fr; }
    .ms-guide { grid-template-columns: 1fr; }
}
