:root {
  font-family: system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  color: #192521;
  background: #f5f7f5;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #192521;
  --muted: #748079;
  --line: #e6ebe7;
  --panel: #fff;
  --green: #176b53;
  --mint: #e8f4ed;
  --red: #b5473c;
  --amber: #a36516;
  --shadow: 0 10px 30px rgba(24,46,36,.06);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
}
button,
input,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 228px minmax(0,1fr);
}
.sidebar {
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 26px 16px 18px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  margin: 0 8px 54px;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--green);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: Manrope,sans-serif;
  font-weight: 800;
  font-size: 17px;
}
.brand strong {
  font-family: Manrope,sans-serif;
  font-size: 15px;
  letter-spacing: -.4px;
}
.brand small {
  display: block;
  color: #809087;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 1px;
}
.nav-label {
  font-size: 10px;
  font-weight: 700;
  color: #9aa59f;
  letter-spacing: 1.2px;
  margin: 0 12px 11px;
}
.nav-list {
  display: grid;
  gap: 4px;
}
.nav-item {
  border: 0;
  background: transparent;
  color: #66736c;
  text-align: left;
  padding: 11px 12px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
}
.nav-item:hover {
  background: #f4f7f4;
  color: var(--ink);
}
.nav-item.active {
  background: var(--mint);
  color: var(--green);
  font-weight: 700;
}
.nav-icon {
  width: 18px;
  text-align: center;
  font-size: 16px;
  line-height: 1;
}
.sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 17px 8px 0;
  color: #637169;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #39a677;
  display: inline-block;
  flex: none;
}
.sidebar-footnote {
  margin: 8px 0 0 16px;
  color: #9aa59f;
  font-size: 11px;
}
.main-area {
  min-width: 0;
  padding: 42px 52px 64px;
}
.page-content {
  max-width: 1160px;
  margin: 0 auto;
}
.page-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
}
.eyebrow {
  color: var(--green);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.15px;
  font-weight: 700;
  margin: 0 0 9px;
}
.page-title {
  font-family: Manrope,sans-serif;
  font-size: 29px;
  letter-spacing: -1.1px;
  line-height: 1.15;
  margin: 0;
  color: var(--ink);
}
.page-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  max-width: 620px;
}
.button {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(23,107,83,.1);
}
.button:hover {
  background: #125943;
}
.button:disabled {
  opacity: .6;
  cursor: wait;
}
.button.secondary {
  background: #fff;
  color: #334039;
  border-color: #dfe6e1;
  box-shadow: none;
}
.button.secondary:hover {
  background: #f7faf7;
}
.button.ghost {
  background: transparent;
  color: #607067;
  box-shadow: none;
}
.button.danger {
  background: #fff;
  color: var(--red);
  border-color: #f0d4d0;
  box-shadow: none;
}
.button.small {
  font-size: 11px;
  padding: 7px 10px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card,
.panel,
.app-card,
.deployment-card,
.setting-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.stat-card {
  padding: 18px 19px;
}
.stat-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.stat-value {
  font: 700 26px Manrope,sans-serif;
  letter-spacing: -.8px;
  margin-top: 11px;
}
.stat-note {
  font-size: 11px;
  color: #95a199;
  margin-top: 5px;
}
.panel {
  padding: 20px 22px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}
.section-title {
  font: 700 14px Manrope,sans-serif;
  margin: 0;
  letter-spacing: -.2px;
}
.muted {
  color: var(--muted);
}
.empty {
  border: 1px dashed #d6dfd9;
  border-radius: 10px;
  background: #fbfcfb;
  text-align: center;
  padding: 42px 20px;
}
.empty-mark {
  height: 46px;
  width: 46px;
  border-radius: 14px;
  margin: 0 auto 15px;
  background: var(--mint);
  color: var(--green);
  display: grid;
  place-items: center;
  font-size: 22px;
}
.empty h3 {
  font: 700 15px Manrope,sans-serif;
  margin: 0 0 7px;
}
.empty p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 390px;
  margin: 0 auto 18px;
}
.app-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 14px;
}
.app-card {
  padding: 18px;
}
.app-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.app-name {
  font: 700 15px Manrope,sans-serif;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.slug {
  font-size: 11px;
  color: #8b9890;
  margin-top: 5px;
}
.app-meta {
  display: grid;
  gap: 9px;
  margin: 17px 0 15px;
  font-size: 11px;
  color: #66736c;
}
.meta-row {
  display: flex;
  gap: 8px;
  min-width: 0;
}
.meta-label {
  color: #98a29c;
  min-width: 55px;
}
.meta-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-actions {
  border-top: 1px solid #edf0ed;
  padding-top: 13px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 30px;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: capitalize;
  background: #f0f3f1;
  color: #66736c;
}
.badge.running {
  background: #e8f4ed;
  color: #287759;
}
.badge.failed {
  background: #fff0ee;
  color: #ac493e;
}
.badge.deploying {
  background: #fff4df;
  color: #a36516;
}
.badge.stopped {
  background: #f0f3f1;
  color: #66736c;
}
.badge .status-dot {
  width: 6px;
  height: 6px;
}
.deployment-list {
  display: grid;
  gap: 8px;
}
.deployment-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #edf0ed;
  font-size: 12px;
}
.deployment-row:last-child {
  border-bottom: 0;
}
.deployment-app {
  font-weight: 700;
}
.deployment-detail {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.code {
  font-family: ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size: 10px;
  color: #67736c;
  background: #f4f6f4;
  border-radius: 4px;
  padding: 3px 5px;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.setting-card {
  padding: 20px;
}
.setting-card h3 {
  font: 700 13px Manrope,sans-serif;
  margin: 0 0 8px;
}
.setting-card p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}
.setting-value {
  display: block;
  margin-top: 13px;
  font-family: ui-monospace,monospace;
  font-size: 11px;
  color: #45534b;
  overflow-wrap: anywhere;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.field {
  display: grid;
  gap: 6px;
}
.field.wide {
  grid-column: 1/-1;
}
.field label {
  font-size: 11px;
  color: #56645b;
  font-weight: 700;
}
.field input,
.field textarea {
  width: 100%;
  border: 1px solid #dfe6e1;
  border-radius: 8px;
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
  outline: none;
  font-size: 12px;
}
.field input:focus,
.field textarea:focus {
  border-color: #5b9a82;
  box-shadow: 0 0 0 3px rgba(35,130,97,.1);
}
.field textarea {
  min-height: 84px;
  resize: vertical;
  line-height: 1.5;
}
.field-hint {
  font-size: 10px;
  color: #8b9890;
  line-height: 1.45;
}
.dialog {
  border: 0;
  border-radius: 14px;
  padding: 0;
  width: min(560px,calc(100vw - 28px));
  box-shadow: 0 24px 80px rgba(14,30,22,.2);
  max-height: calc(100vh - 32px);
  overflow: auto;
}
.dialog::backdrop {
  background: rgba(17,34,26,.35);
  backdrop-filter: blur(3px);
}
.dialog-inner {
  padding: 24px;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 19px;
}
.dialog-title {
  font: 700 18px Manrope,sans-serif;
  margin: 0;
}
.dialog-description {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin: 6px 0 0;
}
.icon-button {
  border: 0;
  background: transparent;
  color: #7f8b83;
  font-size: 20px;
  padding: 0 4px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}
.log-view {
  background: #18221d;
  color: #d2e1d7;
  border-radius: 9px;
  padding: 14px;
  max-height: 55vh;
  overflow: auto;
  font: 11px/1.55 ui-monospace,SFMono-Regular,Menlo,monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  padding: 12px 15px;
  border-radius: 9px;
  background: #1e2a24;
  color: #fff;
  font-size: 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  transition: .2s;
  pointer-events: none;
  max-width: min(440px,calc(100vw - 40px));
  z-index: 20;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}
.auth-wrap {
  min-height: 250px;
  display: grid;
  place-items: center;
}
.auth-card {
  width: min(380px,100%);
  padding: 23px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.auth-card h2 {
  font: 700 17px Manrope,sans-serif;
  margin: 0 0 6px;
}
.auth-card p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 16px;
}
.loading {
  color: var(--muted);
  font-size: 12px;
  padding: 25px 0;
}
.link {
  color: var(--green);
  text-decoration: none;
  font-weight: 700;
}
.link:hover {
  text-decoration: underline;
}
.warning-box {
  padding: 12px 13px;
  border-radius: 8px;
  background: #fff8eb;
  border: 1px solid #f0e2c4;
  color: #86602c;
  font-size: 11px;
  line-height: 1.5;
  margin-top: 15px;
}
@media (max-width:850px) {
  .app-shell {
    grid-template-columns: 70px minmax(0,1fr);
  }
  .sidebar {
    padding: 21px 10px 14px;
  }
  .brand {
    justify-content: center;
    margin: 0 0 42px;
  }
  .brand > span:last-child,
  .nav-label,
  .nav-item:not(.active) {
    font-size: 0;
  }
  .nav-list {
    gap: 7px;
  }
  .nav-item {
    justify-content: center;
    padding: 12px 5px;
  }
  .nav-item .nav-icon {
    font-size: 17px;
  }
  .sidebar-bottom {
    justify-content: center;
    padding: 15px 0 0;
    font-size: 0;
  }
  .sidebar-footnote {
    display: none;
  }
  .main-area {
    padding: 32px 28px 54px;
  }
}
@media (max-width:620px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    position: sticky;
    z-index: 5;
    top: 0;
    height: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 9px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    margin: 0 auto 0 0;
    justify-content: flex-start;
    gap: 8px;
  }
  .brand > span:last-child {
    display: block;
  }
  .brand strong {
    font-size: 13px;
  }
  .brand small {
    font-size: 9px;
  }
  .brand-mark {
    width: 31px;
    height: 31px;
  }
  .nav-label,
  .sidebar-bottom {
    display: none;
  }
  .nav-list {
    display: flex;
    gap: 2px;
  }
  .nav-item {
    font-size: 0;
    padding: 10px 9px;
  }
  .nav-item .nav-icon {
    font-size: 17px;
  }
  .main-area {
    padding: 27px 17px 48px;
  }
  .page-top {
    gap: 12px;
    margin-bottom: 22px;
  }
  .page-title {
    font-size: 24px;
  }
  .page-subtitle {
    font-size: 12px;
  }
  .page-top > .button {
    font-size: 0;
    padding: 10px 11px;
  }
  .page-top > .button::after {
    content: '+';
    font-size: 18px;
    line-height: 10px;
  }
  .stats-grid {
    gap: 8px;
  }
  .stat-card {
    padding: 13px 11px;
  }
  .stat-label {
    font-size: 10px;
  }
  .stat-value {
    font-size: 21px;
  }
  .stat-note {
    font-size: 9px;
  }
  .app-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 16px;
  }
  .deployment-row {
    grid-template-columns: minmax(0,1fr) auto;
    gap: 8px;
  }
  .deployment-row > .deployment-time {
    display: none;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .field.wide {
    grid-column: auto;
  }
  .dialog-inner {
    padding: 19px;
  }
  .dialog-actions {
    position: sticky;
    bottom: -1px;
    background: #fff;
    padding-top: 13px;
  }
}
@media (prefers-reduced-motion:reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto!important;
    transition: none!important;
  }
}

.recent-panel {
  margin-top: 16px;
}
