:root {
  color-scheme: dark;
  --bg: #0a0c11;
  --surface: #11151d;
  --surface-2: #171c26;
  --surface-3: #1d2430;
  --border: #252c39;
  --text: #f4f6fb;
  --muted: #8e98aa;
  --accent: #8b5cf6;
  --accent-2: #6d3ff2;
  --cyan: #35d6cf;
  --green: #45d69e;
  --red: #ff6b78;
  --orange: #f4ad55;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0,0,0,.26);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 75% -10%, rgba(109,63,242,.10), transparent 34%), var(--bg); color: var(--text); font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(29px, 4vw, 42px); line-height: 1.12; letter-spacing: -.035em; }
h2 { margin-bottom: 8px; font-size: 21px; line-height: 1.25; letter-spacing: -.02em; }
h3 { letter-spacing: -.015em; }
code { font-family: "SFMono-Regular", Consolas, monospace; font-size: .91em; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.app-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 30px 20px 22px; border-right: 1px solid var(--border); background: rgba(10,12,17,.90); }
.brand { display: inline-flex; align-items: center; }
.brand-logo { display: block; width: 160px; height: auto; }
.brand.large .brand-logo { width: 204px; }
.sidebar .brand { margin: 0 10px 42px; }
.main-nav { display: flex; flex-direction: column; gap: 6px; }
.main-nav a { display: flex; align-items: center; gap: 13px; padding: 12px 14px; border-radius: 11px; color: var(--muted); font-weight: 550; transition: .18s ease; }
.main-nav a > span { width: 21px; color: #768297; text-align: center; font-size: 19px; }
.main-nav a:hover { background: var(--surface); color: var(--text); }
.main-nav a.active { background: linear-gradient(90deg, rgba(139,92,246,.18), rgba(139,92,246,.07)); color: #d7c8ff; }
.main-nav a.active > span { color: #ae8dff; }
.sidebar-bottom { margin-top: auto; padding-top: 25px; }
.user-card { display: flex; gap: 11px; align-items: center; padding: 13px 10px; border-top: 1px solid var(--border); }
.avatar { display: grid; place-items: center; flex: 0 0 36px; height: 36px; border-radius: 50%; background: var(--surface-3); color: #cdbfff; font-weight: 700; }
.user-card strong, .user-card small { display: block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card strong { font-size: 13px; }
.user-card small { color: var(--muted); font-size: 10px; }
.link-button { padding: 4px 10px; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 12px; }
.link-button:hover { color: var(--text); }
.main-content { width: 100%; max-width: 1540px; margin: 0 auto; padding: 0 42px 25px; }
.topbar { display: flex; justify-content: flex-end; align-items: center; min-height: 91px; margin-bottom: 28px; }
.mobile-brand { display: none; font-weight: 800; }
.balance-chip { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.balance-chip span { color: var(--muted); font-size: 12px; }
.balance-chip strong { font-size: 14px; }
.footer { padding: 42px 0 5px; color: #606b7e; text-align: center; font-size: 12px; }
.footer a { color: var(--muted); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 43px; padding: 10px 18px; border: 1px solid transparent; border-radius: 11px; cursor: pointer; font-weight: 650; line-height: 1.2; transition: transform .15s, background .15s, border-color .15s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { opacity: .42; cursor: not-allowed; }
.button.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: white; box-shadow: 0 8px 25px rgba(109,63,242,.20); }
.button.primary:hover:not(:disabled) { background: linear-gradient(135deg, #9b72f8, #794afa); }
.button.secondary { border-color: #3b3157; background: rgba(139,92,246,.10); color: #cdbbff; }
.button.ghost { border-color: var(--border); background: var(--surface); color: var(--muted); }
.button.warning { border-color: rgba(244,173,85,.28); background: rgba(244,173,85,.09); color: var(--orange); }
.button.danger { border-color: rgba(255,107,120,.24); background: rgba(255,107,120,.08); color: var(--red); }
.button.small { min-height: 34px; padding: 7px 11px; font-size: 12px; }
.button.wide { width: 100%; }
.eyebrow { display: block; margin-bottom: 10px; color: #9d7ff0; font-size: 10px; font-weight: 750; letter-spacing: .16em; }
.page-heading, .hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 31px; }
.page-heading p, .hero p { margin-bottom: 0; color: var(--muted); }
.hero { align-items: center; padding: 31px 34px; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(110deg, rgba(139,92,246,.14), transparent 58%), var(--surface); box-shadow: var(--shadow); }
.hero h1 { margin-bottom: 8px; }
.back-link { display: inline-block; margin-bottom: 17px; color: var(--muted); font-size: 13px; }
.back-link:hover { color: var(--text); }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; margin-bottom: 36px; }
.stat-card { display: block; min-width: 0; padding: 23px 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
a.stat-card:hover { border-color: #3d3456; }
.stat-label { display: block; margin-bottom: 12px; color: var(--muted); font-size: 12px; }
.stat-card > strong { display: block; margin-bottom: 6px; overflow: hidden; font-size: clamp(23px, 2.5vw, 30px); letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.stat-card em { color: #667185; font-size: .65em; font-style: normal; }
.stat-card small { color: #6f7a8e; }
.section-block { margin-top: 34px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.section-heading h2, .section-heading p { margin-bottom: 0; }
.section-heading p { color: var(--muted); }
.section-heading > a { color: var(--muted); font-size: 13px; }
.instance-list { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.instance-row { display: grid; grid-template-columns: auto minmax(180px, 1fr) auto auto 24px; gap: 17px; align-items: center; padding: 19px 21px; border-bottom: 1px solid var(--border); }
.instance-row:last-child { border-bottom: 0; }
.instance-row:hover { background: var(--surface-2); }
.large-list .instance-row { grid-template-columns: auto minmax(180px, 1fr) auto auto auto 24px; }
.gpu-icon { display: grid; place-items: center; width: 45px; height: 45px; border: 1px solid #39304f; border-radius: 12px; background: rgba(139,92,246,.09); color: #b69aff; font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.instance-main { min-width: 0; }
.instance-main strong, .instance-main span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.instance-main span, .instance-spent span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.instance-spent { text-align: right; }
.instance-spent strong { display: block; margin-top: 3px; font-size: 13px; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 20px; background: rgba(142,152,170,.08); color: var(--muted); font-size: 11px; white-space: nowrap; }
.status.online { background: rgba(69,214,158,.08); color: var(--green); }
.row-price { text-align: right; font-size: 13px; white-space: nowrap; }
.row-price small { display: block; color: var(--muted); font-weight: 400; }
.row-arrow { color: #5e687a; }
.empty-state { padding: 48px 25px; border: 1px dashed #303848; border-radius: var(--radius); background: rgba(17,21,29,.55); text-align: center; }
.empty-state.compact { padding: 24px; }
.empty-state p { color: var(--muted); }
.empty-state.compact p { margin: 0; }
.empty-icon { margin-bottom: 15px; color: #695593; font-size: 36px; }
.quick-models { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; margin-top: 34px; }
.quick-models > div { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.quick-models strong { display: block; margin: 12px 0 6px; }
.quick-models p { margin: 0; color: var(--muted); }
.model-badge { padding: 4px 8px; border-radius: 6px; background: rgba(53,214,207,.10); color: var(--cyan); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.model-badge.purple { background: rgba(139,92,246,.12); color: #b99cff; }
.alert { margin-bottom: 20px; padding: 13px 16px; border: 1px solid; border-radius: 11px; font-size: 13px; }
.alert.success { border-color: rgba(69,214,158,.24); background: rgba(69,214,158,.08); color: #83e9bd; }
.alert.error { border-color: rgba(255,107,120,.24); background: rgba(255,107,120,.08); color: #ff9aa4; }
.info-banner { display: flex; gap: 12px; align-items: flex-start; margin-top: 24px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 12px; color: var(--muted); font-size: 12px; }
.info-banner > span { display: grid; place-items: center; flex: 0 0 20px; height: 20px; border: 1px solid #535e72; border-radius: 50%; font-size: 11px; }
.info-banner p { margin: 0; }
.gpu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.gpu-card { padding: 23px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); transition: .18s ease; }
.gpu-card:hover { transform: translateY(-3px); border-color: #493a68; box-shadow: var(--shadow); }
.gpu-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 22px; }
.availability { color: var(--green); font-size: 11px; white-space: nowrap; }
.availability i, .live-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgba(69,214,158,.45); }
.gpu-card h2 { margin-bottom: 7px; }
.gpu-card p { min-height: 43px; color: var(--muted); font-size: 12px; }
.gpu-card-bottom { display: flex; justify-content: space-between; padding-top: 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.gpu-card-bottom b { color: #a488ed; }
.offer-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 26px; }
.pagination span { min-width: 90px; color: var(--muted); text-align: center; font-size: 13px; }
.offer-card { padding: 23px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.offer-price-block { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 21px; }
.offer-price-block span { color: var(--muted); font-size: 12px; }
.offer-price-block strong { color: #c9b5ff; font-size: 23px; letter-spacing: -.03em; }
.offer-specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 17px 22px; margin-bottom: 24px; }
.offer-specs span, .offer-specs strong { display: block; }
.offer-specs span { margin-bottom: 4px; color: var(--muted); font-size: 11px; }
.offer-specs strong { font-size: 13px; }
.narrow-page { max-width: 740px; margin: 0 auto; }
.confirm-card { padding: 33px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.confirm-price { margin: 25px 0; }
.confirm-price strong { font-size: 37px; letter-spacing: -.04em; }
.confirm-price span { margin-left: 7px; color: var(--muted); }
.confirm-specs { padding: 23px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.form-note { display: block; margin-top: 13px; color: var(--muted); font-size: 11px; }
.detail-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; }
.panel { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 21px; }
.panel-heading h2, .panel-heading .eyebrow { margin-bottom: 0; }
.detail-specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.detail-specs span, .detail-specs strong { display: block; }
.detail-specs span { margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.detail-specs strong { font-size: 13px; }
.big-price { margin: 5px 0 21px; font-size: 28px; font-weight: 750; letter-spacing: -.035em; }
.big-price span { margin-left: 6px; color: var(--muted); font-size: 12px; font-weight: 400; }
.billing-line { display: flex; justify-content: space-between; gap: 15px; padding: 9px 0; color: var(--muted); font-size: 12px; }
.billing-line strong { color: var(--text); }
.billing-panel > a { display: block; margin-top: 14px; color: #ae90f6; font-size: 12px; }
.title-with-status { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
.title-with-status h1 { margin-bottom: 0; }
.controls-panel { margin-top: 18px; }
.control-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.ssh-box { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 20px; padding: 15px 17px; border: 1px solid var(--border); border-radius: 11px; background: #0c1016; }
.ssh-box > div { min-width: 0; }
.ssh-box span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.ssh-box code { display: block; overflow-x: auto; color: #c9d3e2; white-space: nowrap; }
.copy-button { flex: 0 0 auto; padding: 7px 10px; border: 1px solid #343e4d; border-radius: 8px; background: var(--surface-2); color: var(--muted); cursor: pointer; font-size: 11px; }
.copy-button:hover { color: var(--text); }
.models-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.model-card { padding: 23px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.model-card-icon { display: grid; place-items: center; width: 39px; height: 39px; margin-bottom: 17px; border-radius: 11px; background: rgba(139,92,246,.12); color: #b79bff; font-weight: 800; }
.model-type { color: var(--muted); font-size: 9px; letter-spacing: .14em; }
.model-card h3 { margin: 7px 0; }
.model-card p { min-height: 43px; color: var(--muted); font-size: 12px; }
.vram-requirement { display: block; margin: 16px 0; color: #7f8b9f; font-size: 11px; }
.deployment-panel { margin-top: 24px; scroll-margin-top: 25px; }
.deployment-output { overflow-x: auto; padding: 17px; border: 1px solid var(--border); border-radius: 11px; background: #0b0f15; color: #bdc8d8; font: 12px/1.7 "SFMono-Regular", Consolas, monospace; }
.deployment-output pre { margin: 0; white-space: pre-wrap; }
.spinner { width: 20px; height: 20px; border: 2px solid #302844; border-top-color: #a989ff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.balance-layout { display: grid; grid-template-columns: 1fr 1.25fr; gap: 18px; }
.current-balance > span { color: var(--muted); }
.current-balance > strong { display: block; margin: 16px 0; font-size: clamp(32px, 4vw, 45px); letter-spacing: -.045em; }
.current-balance p { color: var(--muted); }
.current-balance .button { margin-top: 16px; }
.panel label { display: block; margin: 14px 0 6px; color: var(--muted); font-size: 11px; }
.panel input, .panel select, .inline-add input { width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid #303949; border-radius: 10px; background: #0d1118; color: var(--text); }
.panel input:focus, .panel select:focus, .inline-add input:focus, .amount-input:focus-within { border-color: #7253bd; outline: none; }
.panel form > .button { margin-top: 19px; }
.amount-input { display: flex; align-items: center; border: 1px solid #303949; border-radius: 10px; background: #0d1118; }
.amount-input input { border: 0; background: transparent; }
.amount-input span { padding-right: 14px; color: var(--muted); }
.support-instruction { margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.support-instruction p { margin-bottom: 8px; }
.support-instruction a { color: #b79cf7; }
.transactions { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.transaction-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.transaction-row:last-child { border-bottom: 0; }
.transaction-row strong, .transaction-row span { display: block; }
.transaction-row span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.transaction-row > strong { white-space: nowrap; }
.positive { color: var(--green); }
.negative { color: var(--red); }
.admin-grid, .api-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.admin-stats { margin-bottom: 18px; }
.catalog-list, .key-list { overflow: hidden; margin-bottom: 17px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.catalog-row, .key-row { display: flex; align-items: center; gap: 18px; padding: 15px 19px; border-bottom: 1px solid var(--border); }
.catalog-row:last-child, .key-row:last-child { border-bottom: 0; }
.catalog-row > div:first-child, .key-main { flex: 1; min-width: 0; }
.catalog-row strong, .catalog-row span, .key-main strong, .key-main span { display: block; }
.catalog-row span, .key-main span { color: var(--muted); font-size: 11px; }
.inline-add { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 12px; }
.new-key-panel { margin-bottom: 24px; padding: 24px; border: 1px solid rgba(69,214,158,.27); border-radius: var(--radius); background: rgba(69,214,158,.06); }
.new-key-panel p { color: var(--muted); }
.new-key-value { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border-radius: 10px; background: #0c1214; }
.new-key-value code { flex: 1; overflow-x: auto; color: #a3ecc9; white-space: nowrap; }
.api-auth-doc p { color: var(--muted); font-size: 12px; }
.code-block { display: flex; align-items: center; gap: 12px; margin: 12px 0 20px; padding: 13px; border: 1px solid var(--border); border-radius: 9px; background: #0b0f15; }
.code-block code { flex: 1; overflow-x: auto; white-space: pre; }
.scope-badge { padding: 5px 8px; border-radius: 7px; background: rgba(139,92,246,.09); color: #baa3ed; font-size: 10px; white-space: nowrap; }
.key-used { color: var(--muted); font-size: 11px; white-space: nowrap; }
.endpoint { display: grid; grid-template-columns: 60px minmax(200px, .8fr) 1.4fr; gap: 14px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--border); }
.endpoint:last-child { border-bottom: 0; }
.endpoint p { margin: 0; color: var(--muted); font-size: 12px; }
.method { display: inline-block; padding: 3px 6px; border-radius: 5px; text-align: center; font-size: 9px; font-weight: 800; }
.method.get { background: rgba(53,214,207,.10); color: var(--cyan); }
.method.post { background: rgba(139,92,246,.12); color: #b99cff; }
.method.delete { background: rgba(255,107,120,.10); color: var(--red); }
.error-page { max-width: 550px; margin: 12vh auto; padding: 30px; text-align: center; }
.error-code { display: block; margin-bottom: 10px; color: #6f568f; font-size: 70px; font-weight: 800; line-height: 1; }
.error-page p { margin-bottom: 25px; color: var(--muted); }
.auth-layout { display: grid; grid-template-columns: 1.2fr 1fr; min-height: 100vh; }
.auth-intro { display: flex; flex-direction: column; justify-content: space-between; padding: 46px 6vw; background: radial-gradient(circle at 20% 50%, rgba(139,92,246,.18), transparent 43%); }
.auth-copy { max-width: 650px; margin: 55px 0; }
.auth-copy h1 { font-size: clamp(43px, 5vw, 70px); }
.auth-copy h1 span { color: #a78bec; }
.auth-copy > p { max-width: 550px; color: var(--muted); font-size: 17px; }
.auth-intro > small { color: #657084; }
.feature-row { display: flex; flex-wrap: wrap; gap: 19px; margin-top: 29px; color: #a1aabc; font-size: 12px; }
.feature-row span::first-letter { color: var(--accent); }
.auth-panel { display: grid; place-items: center; padding: 35px; border-left: 1px solid var(--border); background: rgba(17,21,29,.62); }
.login-card { width: 100%; max-width: 430px; padding: 37px; border: 1px solid var(--border); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.telegram-icon { display: grid; place-items: center; width: 57px; height: 57px; margin: 0 auto 24px; border-radius: 17px; background: #249ed9; box-shadow: 0 12px 30px rgba(36,158,217,.20); font-size: 26px; }
.login-card h2 { font-size: 26px; }
.login-card > p { margin-bottom: 25px; color: var(--muted); }
.login-card > small { display: block; margin-top: 20px; color: #687386; font-size: 10px; }
.auth-steps { display: flex; flex-direction: column; gap: 9px; margin: 24px 0; text-align: left; }
.auth-steps div { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.auth-steps span { display: grid; place-items: center; width: 21px; height: 21px; border: 1px solid #343d4c; border-radius: 50%; color: #a3aec0; font-size: 10px; }
.auth-waiting { display: flex; align-items: center; justify-content: center; gap: 8px; color: #778397; font-size: 11px; }
.auth-waiting i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: pulse 1.5s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.auth-error .brand { margin-bottom: 55px; }
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 215px minmax(0,1fr); }
  .main-content { padding: 0 25px 22px; }
  .gpu-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .instance-spent { display: none; }
  .large-list .instance-row { grid-template-columns: auto minmax(150px,1fr) auto auto 24px; }
  .key-used { display: none; }
}
@media (max-width: 800px) {
  .app-shell { display: block; }
  .sidebar { position: static; display: block; width: 100%; height: auto; padding: 15px 18px; border-right: 0; border-bottom: 1px solid var(--border); }
  .sidebar > .brand, .user-card, .sidebar-bottom > form { display: none; }
  .sidebar-bottom { display: none; }
  .main-nav { flex-direction: row; overflow-x: auto; gap: 5px; padding-bottom: 2px; }
  .main-nav a { flex: 0 0 auto; padding: 9px 11px; font-size: 12px; }
  .main-nav a > span { display: none; }
  .main-content { padding: 0 18px 20px; }
  .topbar { min-height: 72px; margin-bottom: 19px; }
  .mobile-brand { display: flex; align-items: center; }
  .mobile-brand .brand-logo { width: 142px; }
  .topbar { justify-content: space-between; }
  .balance-chip { padding: 8px 11px; }
  .balance-chip span { display: none; }
  .page-heading, .hero { align-items: flex-start; margin-bottom: 24px; }
  .hero { padding: 24px; }
  .hero .button { flex: 0 0 auto; }
  .stats-grid { gap: 10px; }
  .stat-card { padding: 17px; }
  .stat-card > strong { font-size: 21px; }
  .stat-card small { font-size: 10px; }
  .instance-row, .large-list .instance-row { grid-template-columns: auto minmax(0,1fr) auto 16px; gap: 11px; padding: 15px; }
  .instance-row .status { display: none; }
  .row-price { font-size: 11px; }
  .detail-grid, .balance-layout, .admin-grid, .api-layout { grid-template-columns: 1fr; }
  .offer-cards, .models-grid { grid-template-columns: 1fr; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-intro { min-height: 43vh; padding: 28px; }
  .auth-copy { margin: 45px 0 20px; }
  .auth-copy h1 { font-size: 42px; }
  .auth-copy > p { font-size: 14px; }
  .auth-intro > small { display: none; }
  .auth-panel { padding: 28px 18px 45px; border-left: 0; }
  .inline-add { grid-template-columns: 1fr 1fr; }
  .inline-add .button { grid-column: 1 / -1; }
  .endpoint { grid-template-columns: 55px 1fr; }
  .endpoint p { grid-column: 2; }
}
@media (max-width: 540px) {
  body { font-size: 14px; }
  .main-content { padding: 0 13px 18px; }
  .page-heading, .hero { flex-direction: column; }
  .page-heading .button, .hero .button { width: 100%; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid > :last-child { grid-column: 1 / -1; }
  .quick-models, .gpu-grid { grid-template-columns: 1fr; }
  .quick-models > div { padding: 19px; }
  .instance-row, .large-list .instance-row { grid-template-columns: auto minmax(0,1fr) 14px; }
  .row-price { display: none; }
  .gpu-icon { width: 39px; height: 39px; }
  .confirm-card, .panel, .offer-card { padding: 20px; }
  .offer-specs, .detail-specs { gap: 15px; }
  .control-buttons, .control-buttons form, .control-buttons .button { width: 100%; }
  .ssh-box { align-items: flex-start; flex-direction: column; }
  .ssh-box code { max-width: 82vw; }
  .inline-add { grid-template-columns: 1fr; }
  .inline-add .button { grid-column: auto; }
  .catalog-row, .key-row { align-items: flex-start; flex-wrap: wrap; gap: 11px; }
  .scope-badge { order: 3; }
  .key-row form { margin-left: auto; }
  .transaction-row { padding: 14px; }
  .transaction-row > strong { font-size: 12px; }
  .login-card { padding: 27px 21px; }
  .auth-intro { padding: 23px; }
  .feature-row { gap: 10px; }
}
