:root {
  --bg: #f4f5f9;
  --panel: #fff;
  --ink: #192136;
  --muted: #6c7589;
  --line: #e4e7ef;
  --brand: #6550dc;
  --soft: #f0edff;
  --green: #168369;
  --red: #bd3f52;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #111724;
  --panel: #1b2333;
  --ink: #e9edf6;
  --muted: #a6b0c4;
  --line: #303b50;
  --soft: #302a50;
  --green: #64d8b4;
  --red: #ff92a2;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    14px/1.5 system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
a {
  color: var(--brand);
  text-decoration: none;
}
button,
.button {
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--brand);
  color: white;
  padding: 10px 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: normal;
}
button:hover,
.button:hover {
  filter: brightness(0.94);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.secondary {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line);
}
.danger {
  background: transparent;
  color: var(--red);
  border-color: var(--line);
}
input,
select,
textarea {
  width: 100%;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  min-width: 0;
}
input[type="checkbox"] {
  width: auto;
  accent-color: var(--brand);
}
textarea {
  min-height: 92px;
  resize: vertical;
}
label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 26px;
  letter-spacing: -0.7px;
  margin-bottom: 6px;
}
h2 {
  font-size: 18px;
  margin-bottom: 16px;
}
h3 {
  font-size: 15px;
}
p {
  margin-bottom: 12px;
}
small,
.muted {
  color: var(--muted);
}
code {
  overflow-wrap: anywhere;
  white-space: normal;
  font-size: 12px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #9e90ff;
  outline-offset: 3px;
}
.skip {
  position: fixed;
  left: 240px;
  top: -80px;
  background: var(--panel);
  padding: 12px;
  z-index: 20;
}
.skip:focus {
  top: 10px;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 224px;
  padding: 26px 16px;
  background: #131a2d;
  color: #b2bad0;
  display: flex;
  flex-direction: column;
  z-index: 11;
}
.brand {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: white;
  display: flex;
  gap: 11px;
  align-items: center;
  margin: 0 12px 33px;
}
.brand-symbol {
  background: #7663f1;
  border-radius: 9px;
  padding: 5px 8px;
  color: white;
  font-size: 18px;
}
.nav-label {
  font-size: 10px;
  letter-spacing: 1.8px;
  margin: 10px 15px;
  color: #77829e;
}
.sidebar nav {
  display: grid;
  gap: 5px;
}
.nav-link {
  color: #adb8d2;
  padding: 11px 13px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 13px;
}
.nav-link.active {
  background: #6550dc;
  color: white;
}
.nav-link:hover {
  background: #293149;
  color: white;
}
.nav-icon {
  width: 19px;
  font-size: 16px;
  text-align: center;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 22px 12px 0;
  font-size: 11px;
  line-height: 1.8;
  border-top: 1px solid #2c3449;
}
.sidebar-bottom strong {
  display: block;
  color: #d6dced;
}
.topbar {
  position: fixed;
  left: 224px;
  right: 0;
  top: 0;
  height: 72px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 8;
}
.breadcrumb {
  color: var(--muted);
  font-size: 12px;
  flex: 1;
  min-width: 0;
}
.breadcrumb strong {
  color: var(--ink);
  font-weight: 500;
}
.top-balance {
  font-size: 13px;
  padding-right: 17px;
  border-right: 1px solid var(--line);
  white-space: nowrap;
}
.top-balance small {
  display: block;
  font-size: 10px;
}
.profile {
  max-width: 170px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  min-width: 0;
}
.profile span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.avatar {
  background: var(--soft);
  color: var(--brand);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.icon-button {
  padding: 7px 10px;
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
}
.mobile-menu {
  display: none;
}
#main {
  margin: 72px 0 0 224px;
  padding: 25px 28px;
  min-height: calc(100vh - 72px);
  max-width: none;
  width: auto;
}
.demo {
  background: #fff4d9;
  color: #8d6417;
  font-size: 11px;
  padding: 8px 13px;
  border: 1px solid #f4dfaa;
  border-radius: 6px;
  margin-bottom: 18px;
}
.notice {
  color: var(--red);
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.notice:not(:empty) {
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 15px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 23px;
}
.page-heading p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
  min-width: 0;
}
.catalog {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.filters {
  padding: 18px;
}
.filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.filters-head h2 {
  margin: 0;
  font-size: 14px;
}
.text-button {
  padding: 0;
  background: transparent;
  color: var(--brand);
  font-size: 11px;
}
.filters form {
  display: grid;
  gap: 16px;
}
.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.filter-section {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-note {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}
.catalog-main {
  min-width: 0;
}
.template-bar {
  display: flex;
  gap: 15px;
  align-items: center;
  padding: 18px;
  margin-bottom: 16px;
}
.template-icon {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  background: var(--soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}
.template-info {
  flex: 1;
  min-width: 0;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.2px;
  color: var(--muted);
  text-transform: uppercase;
}
.template-info h3 {
  margin: 2px 0;
}
.template-info small {
  font-size: 11px;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}
.quick-filters {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.chip {
  font-size: 11px;
  padding: 7px 10px;
  background: var(--panel);
  color: var(--muted);
  border-color: var(--line);
}
.chip.selected {
  color: var(--brand);
  border-color: var(--brand);
  background: var(--soft);
}
.sort {
  width: auto;
  font-size: 12px;
  padding: 8px;
}
.result-count {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 10px;
}
.offers {
  display: grid;
  gap: 11px;
}
.offer {
  display: grid;
  grid-template-columns:
    minmax(125px, 1.15fr) minmax(125px, 1.1fr) minmax(100px, 0.85fr)
    minmax(135px, 1fr);
  padding: 19px 17px;
  gap: 15px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  align-items: center;
  box-shadow: 0 2px 3px #14243c02;
}
.offer:hover {
  border-color: #b9b0f0;
}
.offer h3 {
  font-size: 16px;
  margin: 0 0 7px;
}
.offer .gpu-sub {
  font-size: 11px;
  color: var(--muted);
}
.specs {
  display: grid;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
}
.specs b {
  color: var(--ink);
  font-weight: 500;
}
.badge {
  display: inline-flex;
  width: fit-content;
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--soft);
  color: var(--brand);
}
.verified {
  color: var(--green);
  background: #15987112;
}
.price {
  text-align: right;
}
.price strong {
  font-size: 20px;
  letter-spacing: -0.5px;
}
.price small {
  display: block;
  font-size: 10px;
}
.price .actions {
  justify-content: flex-end;
  margin-top: 11px;
}
.price button {
  font-size: 11px;
  padding: 8px 10px;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.empty {
  padding: 50px 22px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--panel);
}
.filter-toggle {
  display: none;
}
.footnote {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
  margin: 18px 0 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;
  margin-bottom: 24px;
}
.stat .eyebrow {
  margin-bottom: 15px;
}
.stat strong {
  font-size: 26px;
  display: block;
  overflow-wrap: anywhere;
  line-height: 1.3;
}
.stat small {
  font-size: 11px;
}
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}
.stack {
  display: grid;
  gap: 18px;
}
.instance-card {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 22px;
  border-radius: 10px;
  margin-bottom: 13px;
}
.instance-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.instance-head h3 {
  margin: 0;
}
.instance-info {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  margin: 15px 0;
}
.ssh {
  display: block;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 12px 0;
  color: var(--ink);
}
.instance-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.instance-actions button {
  font-size: 12px;
}
.positive {
  color: var(--green);
}
.negative {
  color: var(--red);
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  font-size: 12px;
}
th,
td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
th {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg);
}
td:last-child {
  white-space: nowrap;
}
.payment-reference {
  display: block;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.payment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  flex-wrap: wrap;
}
.payment-row button {
  font-size: 11px;
}
.form-stack {
  display: grid;
  gap: 17px;
}
.key-card {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.key-card h3 {
  margin-bottom: 5px;
  overflow-wrap: anywhere;
}
.key-card code {
  display: block;
  margin: 8px 0;
}
.templates-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.template-card h2 {
  margin-top: 15px;
}
.template-card p {
  font-size: 13px;
  color: var(--muted);
}
.template-card code {
  display: block;
  padding: 10px;
  background: var(--bg);
  margin: 15px 0;
  border-radius: 5px;
}
.template-card .button {
  margin-top: 16px;
}
.help details {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.help summary {
  font-weight: 600;
  cursor: pointer;
}
.help details p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.8;
}
.ssh-guide {
  margin-bottom: 20px;
}
.guide-intro {
  color: var(--muted);
  line-height: 1.7;
  max-width: 850px;
}
.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.guide-step {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
}
.guide-step-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.guide-step-head h3 {
  margin: 0;
  font-size: 15px;
}
.guide-step-number {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--primary);
  font-weight: 700;
}
.guide-step > p {
  margin: 12px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.guide-os {
  display: block;
  margin: 12px 0 6px;
  font-size: 12px;
}
.guide-command {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 10px 0;
}
.guide-command code {
  flex: 1;
  min-width: 0;
  padding: 11px 12px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--ink);
  white-space: nowrap;
}
.guide-command button {
  flex: 0 0 auto;
  padding: 10px 12px;
  font-size: 11px;
}
.guide-warning {
  margin-top: 16px;
  padding: 15px 17px;
  border: 1px solid #f1c75b;
  border-radius: 9px;
  background: color-mix(in srgb, #f1c75b 12%, var(--panel));
}
.guide-warning p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}
@media (max-width: 760px) {
  .guide-grid {
    grid-template-columns: 1fr;
  }
  .guide-command {
    align-items: stretch;
    flex-direction: column;
  }
  .guide-command code {
    width: 100%;
  }
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 5px 0 17px;
}
.section-head h2 {
  margin: 0;
}
.section-head a {
  font-size: 12px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--ink);
  max-width: min(580px, calc(100vw - 30px));
  width: 580px;
  padding: 27px;
  max-height: 90vh;
  overflow: auto;
}
dialog::backdrop {
  background: #11182790;
  backdrop-filter: blur(3px);
}
#close-modal {
  margin-top: 18px;
}
.quote-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0;
}
.quote-grid > div {
  background: var(--bg);
  padding: 12px;
  border-radius: 7px;
}
.quote-grid small {
  display: block;
  font-size: 11px;
}
.quote-grid strong {
  display: block;
  font-size: 16px;
}
.modal-error {
  color: var(--red);
  font-size: 13px;
  margin: 12px 0;
  white-space: pre-line;
}
.overlay {
  display: none;
}
@media (min-width: 1600px) {
  .catalog {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .offer {
    padding: 23px;
  }
  .offers {
    gap: 14px;
  }
}
@media (max-width: 1250px) {
  .sidebar {
    width: 195px;
  }
  .topbar {
    left: 195px;
  }
  #main {
    margin-left: 195px;
    padding: 22px 20px;
  }
  .catalog {
    grid-template-columns: 205px minmax(0, 1fr);
    gap: 15px;
  }
  .offer {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .price {
    text-align: left;
  }
  .price .actions {
    justify-content: flex-start;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 800px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s;
    width: 240px;
  }
  .sidebar.open {
    transform: none;
  }
  .topbar {
    left: 0;
    height: 62px;
    padding: 0 15px;
    gap: 10px;
  }
  .mobile-menu {
    display: inline-flex;
  }
  .breadcrumb {
    display: none;
  }
  .top-balance {
    margin-left: auto;
    padding-right: 10px;
  }
  .profile {
    max-width: 100px;
  }
  .profile .avatar {
    display: none;
  }
  #main {
    margin: 62px 0 0;
    padding: 18px 15px;
  }
  .page-heading {
    gap: 10px;
    align-items: flex-start;
  }
  .page-heading h1 {
    font-size: 23px;
  }
  .page-heading p {
    font-size: 12px;
  }
  .page-heading > .button {
    font-size: 11px;
    padding: 9px;
  }
  .catalog {
    display: block;
  }
  .filters {
    display: none;
    margin-bottom: 17px;
  }
  .filters.open {
    display: block;
  }
  .filter-toggle {
    display: inline-flex;
  }
  .template-bar {
    flex-wrap: wrap;
    padding: 15px;
    gap: 10px;
  }
  .template-bar > button {
    margin-left: auto;
    font-size: 11px;
  }
  .template-info small {
    overflow-wrap: anywhere;
  }
  .offer {
    padding: 17px;
    gap: 18px 10px;
  }
  .offer h3 {
    font-size: 17px;
  }
  .price strong {
    font-size: 21px;
  }
  .price {
    grid-column: 1/-1;
    border-top: 1px solid var(--line);
    padding-top: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }
  .price .actions {
    margin: 0;
  }
  .offer-location {
    grid-column: 1/-1;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 16px;
  }
  .stat strong {
    font-size: 21px;
  }
  .two-col,
  .templates-grid {
    grid-template-columns: 1fr;
  }
  .toolbar {
    gap: 12px;
  }
  .quick-filters {
    gap: 5px;
  }
  .chip {
    font-size: 10px;
    padding: 7px 8px;
  }
  .sort {
    max-width: 160px;
  }
  .overlay.open {
    display: block;
    position: fixed;
    inset: 0;
    background: #0f172a80;
    z-index: 10;
  }
  .instance-head {
    align-items: flex-start;
  }
  .instance-head h3 {
    max-width: 70%;
    overflow-wrap: anywhere;
  }
  .instance-card {
    padding: 17px;
  }
  .panel {
    padding: 18px;
  }
  .top-balance {
    font-size: 11px;
  }
  .profile span {
    font-size: 11px;
  }
  dialog {
    padding: 20px;
  }
  .quote-grid {
    gap: 8px;
  }
  .quote-grid strong {
    font-size: 14px;
  }
}

@media (max-width: 800px) {
  .template-bar > .template-info {
    flex-basis: calc(100% - 60px);
  }
  .template-bar > button {
    width: 100%;
    margin-top: 3px;
  }
  .price .actions {
    flex-wrap: nowrap;
  }
  .price .actions button {
    font-size: 10px;
    padding: 8px;
  }
  .price > div:first-child {
    min-width: 0;
  }
}
