:root {
    color-scheme: light;
    font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: #182433;
    background: #f4f6f8;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: #f4f6f8; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.sidebar { background: #17212b; color: #fff; padding: 20px 14px; display: flex; flex-direction: column; }
.brand { padding: 4px 10px 22px; font-size: 18px; font-weight: 700; }
.brand small { display: block; margin-top: 4px; color: #9fb0bf; font-size: 12px; font-weight: 400; }
.nav-link { display: flex; align-items: center; gap: 10px; color: #c4d0da; text-decoration: none; padding: 10px 12px; margin-bottom: 4px; border-radius: 6px; }
.nav-link.router-link-active { color: #fff; background: #2878c8; }
.sidebar-footer { margin-top: auto; padding: 10px; color: #9fb0bf; font-size: 13px; }
.main { min-width: 0; }
.topbar { height: 64px; background: #fff; border-bottom: 1px solid #dde3e8; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; }
.content { max-width: 1240px; padding: 26px 28px 50px; margin: 0 auto; }
.page-title { margin: 0 0 4px; font-size: 24px; }
.page-subtitle { margin: 0 0 22px; color: #687787; }
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: #fff; border: 1px solid #dde3e8; border-radius: 7px; }
.card-header { padding: 15px 18px; border-bottom: 1px solid #e5e9ed; font-weight: 600; }
.card-body { padding: 18px; }
.metric { font-size: 28px; font-weight: 700; margin-top: 8px; }
.muted { color: #748392; }
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 7px; font-weight: 600; font-size: 14px; }
.input { width: 100%; min-height: 40px; border: 1px solid #cfd8df; border-radius: 5px; padding: 9px 11px; background: #fff; }
textarea.input { min-height: 120px; resize: vertical; }
.btn { border: 1px solid transparent; border-radius: 5px; min-height: 38px; padding: 8px 14px; background: #fff; color: #263747; }
.btn-primary { background: #2878c8; color: #fff; }
.btn-danger { background: #d63939; color: #fff; }
.btn-outline { border-color: #cbd5dd; }
.btn-compact { min-height: 32px; padding: 5px 10px; font-size: 13px; white-space: nowrap; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.segmented-control { display: inline-grid; grid-template-columns: repeat(2, minmax(104px, 1fr)); padding: 3px; border: 1px solid #cfd8df; border-radius: 6px; background: #f5f7f9; }
.segmented-control button { min-height: 34px; border: 0; border-radius: 4px; padding: 6px 14px; color: #526373; background: transparent; }
.segmented-control button.active { color: #fff; background: #2878c8; }
.release-mode-field { padding: 14px; border: 1px solid #d8e1e8; border-radius: 6px; background: #f8fafb; }
.release-mode-hint { margin-top: 9px; font-size: 13px; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.alert { padding: 11px 13px; border-radius: 5px; margin-bottom: 16px; }
.alert-error { color: #8e2020; background: #fde8e8; border: 1px solid #f4c5c5; }
.alert-success { color: #16633b; background: #e6f7ed; border: 1px solid #bde5cd; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid #e7ebef; white-space: nowrap; }
th { color: #667584; font-size: 13px; }
.badge { display: inline-block; padding: 3px 7px; border-radius: 4px; background: #e8f1fb; color: #2167a9; font-size: 12px; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(420px, 100%); }
.install-page { width: min(1080px, calc(100% - 36px)); margin: 0 auto; padding: 46px 0 64px; }
.install-header { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.install-header h1 { margin: 0; font-size: 26px; }
.install-header p { margin: 4px 0 0; color: #687787; }
.brand-mark { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 7px; background: #17212b; color: #fff; font-size: 22px; font-weight: 700; }
.install-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 18px; align-items: start; }
.install-form { min-width: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.section-divider { height: 1px; background: #e5e9ed; margin: 4px 0 20px; }
.requirement-row { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #edf0f2; }
.status-dot { font-size: 12px; font-weight: 600; }
.status-dot.is-ok { color: #167347; }
.status-dot.is-error { color: #b52b2b; }
.install-note { margin-top: 16px; font-size: 13px; line-height: 1.7; }
.code { font-family: Consolas, monospace; word-break: break-all; background: #f5f7f9; padding: 12px; border-radius: 5px; }
.progress { height: 8px; border-radius: 4px; background: #e8edf1; overflow: hidden; }
.progress-bar { height: 100%; background: #2878c8; transition: width .2s ease; }
@media (max-width: 800px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .grid-3 { grid-template-columns: 1fr; }
    .topbar, .content { padding-left: 18px; padding-right: 18px; }
    .install-page { padding-top: 24px; }
    .install-layout, .form-grid { grid-template-columns: 1fr; }
}
