:root {
  color-scheme: light; --bg: #f6f7fb; --surface: #fff; --text: #20283f;
  --muted: #6e778e; --line: #e7eaf2; --accent: #5163e9; --accent-soft: #eef0ff;
  --green: #247c58; --green-soft: #eaf7f0; --amber: #99651a; --amber-soft: #fff6e6;
  --red: #ba4253; --red-soft: #fff0f2; --radius: 14px;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; color: var(--text); background: var(--bg); font: 14px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #8897ff; outline-offset: 3px; }
.icon { width: 20px; height: 20px; flex-shrink: 0; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 232px; padding: 32px 16px 20px; color: #afb6cc; background: #171d31; display: flex; flex-direction: column; z-index: 5; }
.brand { display: flex; gap: 12px; align-items: center; color: inherit; }
.brand strong { font-size: 20px; font-weight: 650; letter-spacing: -.5px; }
.brand-mark { width: 35px; height: 35px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--accent); color: white; font-size: 21px; font-weight: 750; }
.sidebar .brand { color: white; padding: 0 12px; margin-bottom: 42px; }
.nav-caption { margin: 0 16px 12px; color: #7e88a6; font-size: 10px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; }
.nav { display: flex; flex-direction: column; gap: 6px; }
.nav a { padding: 13px 15px; display: flex; align-items: center; gap: 13px; border-radius: 9px; color: #afb6cc; font-size: 13px; font-weight: 550; text-decoration: none; }
.nav a:hover { background: #ffffff09; color: white; }
.nav a.active { color: #fff; background: #303958; }
.nav a.active .icon { color: #aab5ff; }
.nav a.active:after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #aab5ff; margin-left: auto; }
.sidebar-footer { margin-top: auto; padding: 20px 12px 0; }
.profile { border-top: 1px solid #ffffff10; padding-top: 21px; display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #ebeeff; color: #5862a6; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 650; flex-shrink: 0; }
.sidebar .avatar { color: #d5dcff; background: #364160; }
.profile-copy { flex: 1; min-width: 0; }
.profile-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 550; color: #eef1fa; }
.profile-copy small { display: block; margin-top: 2px; color: #8892ac; font-size: 11px; }
.sidebar-footer .icon-button { color: #9ca6c1; background: transparent; border: 0; }
.main { margin-left: 232px; min-height: 100vh; }
.topbar { height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); background: var(--surface); padding: 0 36px; }
.workspace { display: flex; align-items: center; gap: 10px; min-width: 0; }
.workspace-icon { background: var(--accent-soft); color: var(--accent); width: 31px; height: 31px; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.workspace select { border: 0; color: var(--text); background: transparent; max-width: 260px; padding: 8px 23px 8px 0; font-size: 13px; font-weight: 600; }
.topbar-actions { display: flex; gap: 13px; align-items: center; }
.update-time { color: var(--muted); font-size: 11px; }
.icon-button { min-width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.icon-button:hover { background: var(--bg); color: var(--text); }
.content { max-width: 1370px; margin: 0 auto; padding: 32px 36px 48px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 26px; }
.page-head h1 { margin: 0; font-size: 29px; font-weight: 650; line-height: 1.25; letter-spacing: -.8px; }
.page-head p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); min-height: 40px; padding: 9px 14px; border-radius: 8px; font-size: 12px; font-weight: 600; line-height: 1.4; text-decoration: none; }
.button:hover { background: var(--bg); text-decoration: none; }
.button-primary { background: var(--accent); color: white; border-color: var(--accent); }
.button-primary:hover { background: #4354d5; border-color: #4354d5; }
.button-small { min-height: 34px; padding: 7px 11px; font-size: 11px; }
.button-danger { background: var(--red-soft); border-color: #f3ccd3; color: var(--red); }
.text-button { color: var(--accent); background: transparent; border: 0; display: inline-flex; gap: 6px; align-items: center; padding: 5px 0; font-size: 12px; font-weight: 550; }
.text-button .icon { width: 15px; height: 15px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 24px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; }
.stat-top .icon { color: #9aa3b9; width: 18px; height: 18px; }
.stat-value { font-size: 30px; font-weight: 650; letter-spacing: -.8px; line-height: 1.3; margin: 10px 0 4px; }
.stat-value.alert { color: var(--red); }
.stat-note { color: var(--muted); font-size: 11px; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(250px, 1fr); gap: 22px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; margin-bottom: 22px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 21px 22px 17px; }
.panel-head h2 { margin: 0; font-size: 14px; font-weight: 650; }
.panel-head p { color: var(--muted); font-size: 11px; margin: 4px 0 0; }
.count { color: #8b93a6; font-size: 12px; font-weight: 450; margin-left: 7px; }
.app-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; padding: 16px 22px; align-items: center; border-top: 1px solid #f0f1f6; }
.app-row:hover { background: #fafbff; }
.app-icon { height: 34px; width: 34px; background: #f0f2fb; border: 1px solid #e7ebf8; color: #6a78af; display: flex; align-items: center; justify-content: center; border-radius: 9px; }
.app-icon .icon { width: 18px; height: 18px; }
.row-main { min-width: 0; }
.row-title { font-size: 13px; font-weight: 600; color: var(--text); background: transparent; border: 0; padding: 0; text-align: left; max-width: 100%; overflow-wrap: anywhere; }
.row-title:hover { color: var(--accent); }
.row-subtitle { margin-top: 3px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.status { display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; border-radius: 6px; padding: 5px 8px; font-size: 10px; line-height: 1.3; font-weight: 550; color: #687187; background: #f1f3f8; }
.status:before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.status.good { color: var(--green); background: var(--green-soft); }
.status.pending { color: var(--amber); background: var(--amber-soft); }
.status.bad { color: var(--red); background: var(--red-soft); }
.cluster-card { display: flex; align-items: center; gap: 11px; margin: 0 18px; padding: 16px 3px; border-top: 1px solid #f0f1f6; }
.cluster-card .row-main { flex: 1; }
.cluster-card .app-icon { background: #f2f5f7; color: #7b8c9e; border-color: #e9edf3; }
.cluster-card .row-title { font-size: 12px; }
.notice { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 16px; border-radius: 10px; border: 1px solid #f4d9de; background: #fff6f7; color: #9e3e4e; font-size: 12px; margin-bottom: 22px; }
.notice-copy { display: flex; align-items: center; gap: 10px; min-width: 0; }
.notice .text-button { color: inherit; white-space: nowrap; }
.resource-state { padding: 38px 22px; text-align: center; }
.state-icon { display: flex; align-items: center; justify-content: center; width: 43px; height: 43px; border-radius: 13px; background: var(--bg); color: #8b94ad; margin: 0 auto 13px; }
.resource-state h3 { font-size: 14px; font-weight: 600; margin: 0 0 6px; }
.resource-state p { color: var(--muted); font-size: 12px; max-width: 330px; margin: 0 auto 17px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 22px 18px; }
.search { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 0 11px; gap: 8px; min-width: 0; max-width: 310px; flex: 1; color: #a0a8ba; }
.search .icon { width: 17px; height: 17px; }
.search input { border: 0; outline: none; padding: 10px 0; background: transparent; min-width: 0; width: 100%; color: var(--text); font-size: 12px; }
.filter-select { border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; color: var(--muted); background: white; font-size: 12px; max-width: 180px; }
.app-table-head, .app-table-row { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, .9fr) minmax(0, 1fr) minmax(0, .8fr) auto; gap: 16px; align-items: center; padding: 13px 22px; }
.app-table-head { color: #8a93a8; font-size: 10px; background: #fbfcfe; border-block: 1px solid var(--line); }
.app-table-row { min-height: 83px; border-bottom: 1px solid #f0f1f6; font-size: 12px; }
.app-table-row:last-child { border-bottom: 0; }
.app-table-row:hover { background: #fafbff; }
.app-table-name { display: flex; align-items: center; gap: 11px; min-width: 0; }
.app-table-name .row-main { flex: 1; }
.app-table-environment { color: var(--muted); overflow-wrap: anywhere; }
.app-table-time { color: var(--muted); font-size: 11px; }
.app-table-actions { display: flex; gap: 7px; justify-content: flex-end; }
.table-mobile-label { display: none; }
.table-wrap { padding: 0 22px 8px; }
.data-table { border-collapse: collapse; width: 100%; font-size: 12px; table-layout: fixed; }
.data-table th { padding: 12px 10px; color: #8a93a8; text-align: left; font-size: 10px; font-weight: 500; border-bottom: 1px solid var(--line); }
.data-table td { padding: 16px 10px; border-bottom: 1px solid #f0f1f6; overflow-wrap: anywhere; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.member { display: flex; align-items: center; gap: 10px; min-width: 0; }
.member strong { font-weight: 550; }
.member small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; overflow-wrap: anywhere; }
.role { display: inline-block; font-size: 11px; color: #65708b; background: #f2f4fa; padding: 4px 8px; border-radius: 5px; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.screen-reader { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.mobile-nav, .mobile-logout { display: none; }
.auth-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: #f2f4fa; }
.auth-card { background: white; padding: 40px; border: 1px solid var(--line); border-radius: 20px; max-width: 430px; width: 100%; box-shadow: 0 10px 40px #192b5610; }
.auth-card .brand { margin-bottom: 37px; }
.auth-card h1 { font-size: 26px; line-height: 1.3; letter-spacing: -.6px; margin: 0 0 12px; font-weight: 650; }
.auth-card p { color: var(--muted); font-size: 13px; margin: 0 0 26px; }
.auth-card .button { width: 100%; }
.loading-line { height: 3px; border-radius: 3px; background: linear-gradient(90deg, #eef0ff, #6273ee, #eef0ff); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
dialog { padding: 0; border: 1px solid var(--line); border-radius: 16px; background: white; color: var(--text); width: min(600px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow: auto; box-shadow: 0 24px 80px #121c3b30; }
dialog::backdrop { background: #151d3b66; }
.modal-head { padding: 23px 24px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; }
.modal-head h2 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.4px; overflow-wrap: anywhere; }
.modal-head p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.modal-body { padding: 22px 24px; }
.modal-foot { padding: 16px 24px 21px; display: flex; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--line); }
.field { margin-bottom: 17px; }
.field label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 550; }
.field input, .field select { width: 100%; min-width: 0; color: var(--text); border: 1px solid #dce1ed; border-radius: 8px; background: white; padding: 10px 11px; font-size: 13px; }
.field small { display: block; color: var(--muted); font-size: 11px; margin-top: 6px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.advanced { padding: 14px 0 0; margin-top: 6px; border-top: 1px solid var(--line); }
.advanced summary { color: var(--muted); cursor: pointer; font-size: 12px; margin-bottom: 14px; }
.details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px 24px; margin: 0 0 24px; }
.details-grid dt { color: var(--muted); font-size: 11px; margin-bottom: 5px; }
.details-grid dd { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.details-grid .wide { grid-column: 1 / -1; }
.history-title { font-size: 13px; margin: 0 0 12px; }
.history-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.history-row .row-main { flex: 1; }
.history-row .row-title { font-size: 12px; }
.modal-error { color: var(--red); background: var(--red-soft); border-radius: 8px; padding: 10px 12px; font-size: 12px; margin: 16px 0 0; }
.modal-error:empty { display: none; }
.toast-region { position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 9px; z-index: 20; }
.toast { color: white; background: #26314e; box-shadow: 0 6px 24px #17234520; border-radius: 10px; padding: 13px 17px; font-size: 12px; max-width: min(380px, calc(100vw - 32px)); }
.toast.error { background: #a33d50; }
@media (max-width: 1100px) {
  .sidebar { width: 208px; } .main { margin-left: 208px; }
  .content, .topbar { padding-inline: 26px; }
  .overview-grid { grid-template-columns: minmax(0, 1.5fr) minmax(235px, 1fr); gap: 18px; }
  .app-table-head, .app-table-row { grid-template-columns: minmax(0, 1.6fr) minmax(0, .9fr) minmax(0, 1fr) auto; gap: 12px; }
  .app-table-time { display: none; }
}
@media (max-width: 800px) {
  .sidebar { display: none; } .main { margin-left: 0; }
  .topbar { height: 64px; padding-inline: 20px; }
  .content { padding: 26px 20px 100px; } .page-head h1 { font-size: 26px; }
  .mobile-nav { position: fixed; bottom: 0; inset-inline: 0; background: white; border-top: 1px solid var(--line); padding: 7px 10px calc(7px + env(safe-area-inset-bottom)); z-index: 5; display: flex; justify-content: space-around; }
  .mobile-nav a { color: #8a92a7; text-decoration: none; font-size: 10px; min-height: 48px; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 8px; }
  .mobile-nav a.active { color: var(--accent); background: #f6f7ff; }
  .mobile-logout { display: inline-flex; } .update-time { display: none; }
  .topbar-actions { gap: 8px; } .overview-grid { grid-template-columns: minmax(0, 1fr); }
  .toast-region { bottom: 82px; right: 16px; }
}
@media (max-width: 540px) {
  .topbar { padding-inline: 16px; } .workspace { gap: 8px; }
  .workspace select { max-width: 180px; font-size: 12px; }
  .icon-button { min-width: 40px; height: 40px; }
  .content { padding: 23px 16px 94px; }
  .page-head { flex-wrap: wrap; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
  .page-head h1 { font-size: 25px; } .page-head p { font-size: 12px; }
  .stats { gap: 8px; margin-bottom: 20px; } .stat { padding: 14px 11px; border-radius: 10px; }
  .stat-top { font-size: 10px; line-height: 1.3; min-height: 26px; } .stat-top .icon { display: none; }
  .stat-value { font-size: 24px; margin-top: 6px; } .stat-note { font-size: 10px; min-height: 30px; }
  .panel { border-radius: 12px; margin-bottom: 18px; } .panel-head { padding: 18px 16px 16px; }
  .panel-head h2 { font-size: 13px; } .app-row { padding: 15px 16px; gap: 9px; }
  .app-row .app-icon { width: 29px; height: 29px; } .status { font-size: 10px; padding: 5px 7px; }
  .notice { padding: 12px; gap: 8px; font-size: 11px; } .notice-copy { gap: 8px; }
  .notice .icon { width: 16px; height: 16px; } .notice .text-button { font-size: 11px; }
  .toolbar { flex-wrap: wrap; padding-inline: 16px; gap: 9px; } .search { max-width: none; flex-basis: 100%; }
  .search input { min-height: 42px; font-size: 13px; } .filter-select { min-height: 42px; max-width: 100%; flex: 1; }
  .app-table-head { display: none; }
  .app-table-row { display: block; padding: 19px 16px; }
  .app-table-name { gap: 9px; margin-bottom: 14px; }
  .app-table-status { display: inline-block; }
  .app-table-environment { float: right; font-size: 11px; max-width: 55%; }
  .table-mobile-label { display: inline; color: #98a0b1; }
  .app-table-actions { justify-content: flex-start; margin-top: 14px; flex-wrap: wrap; }
  .button-small { min-height: 42px; padding: 8px 10px; font-size: 11px; }
  .table-wrap { padding: 0 16px 8px; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table thead { display: none; } .data-table tr { padding: 13px 0; border-top: 1px solid var(--line); }
  .data-table td { padding: 6px 0; border: 0; }
  .data-table td[data-label] { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
  .data-table td[data-label]:before { content: attr(data-label); color: var(--muted); font-size: 11px; }
  .data-table .member { margin-bottom: 5px; } .data-table .member small { font-size: 12px; }
  .details-grid { gap: 17px 15px; } .modal-head { padding: 19px 18px 16px; }
  .modal-body { padding: 19px 18px; } .modal-foot { padding: 14px 18px 18px; }
  .history-row { flex-wrap: wrap; } .auth-card { padding: 30px 24px; }
  .field input, .field select { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *:before, *:after { animation: none !important; scroll-behavior: auto !important; } }

/* Repository delivery */
.repo-actions { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:20px; }
.target-picker { border:1px solid var(--line, #e2e8f0); border-radius:12px; padding:12px; }
.target-picker legend { padding:0 6px; font-size:13px; font-weight:600; }
.target-choice { display:flex; gap:12px; align-items:center; padding:10px; cursor:pointer; border-radius:8px; }
.target-choice:hover { background:#f5f7fb; }
.target-choice input { width:18px; height:18px; accent-color:#5266d8; }
.target-choice small { display:block; color:#64748b; margin-top:3px; }
.target-row { display:flex; align-items:center; gap:14px; padding:12px 0; border-bottom:1px solid #edf0f5; }
.target-message { margin:5px 0 0; font-size:12px; color:#b45309; overflow-wrap:anywhere; }
.deployment-entry { margin-bottom:14px; padding:0 14px 8px; border:1px solid #e2e8f0; border-radius:12px; }
.deployment-entry .history-row { flex-wrap:wrap; }
.details-grid .mono { overflow-wrap:anywhere; }