dialog.account-portal {
  width: min(1280px, calc(100vw - 40px));
  height: min(760px, calc(100dvh - 40px));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid #24334f;
  border-radius: 24px;
  background: #0d1629;
  color: #eef3ff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
dialog.account-portal::backdrop { background: #050914; }
dialog.account-portal [hidden] { display: none !important; }
.account-auth-shell { height: 100%; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; padding: 8px; overflow: auto; background: radial-gradient(ellipse at 50% 10%, #15223d 0, #0b1427 52%, #08111f 100%); }
.account-auth-card { width: 100%; min-width: 0; min-height: 0; height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); overflow: auto; border: 1px solid #24334f; border-radius: 22px; background: #0f192b; box-shadow: 0 24px 90px #0008; }
.account-auth-info { min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: clamp(24px, 3.4vw, 54px); border-right: 1px solid #202d44; }
.account-auth-badge { display: inline-flex; align-items: center; gap: 11px; align-self: flex-start; padding: 12px 17px; border: 1px solid #2c3b56; border-radius: 999px; color: #bec8da; font-weight: 800; }
.account-auth-badge svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.account-auth-info h1 { max-width: 620px; margin: 21px 0 12px; font-size: clamp(28px, 3vw, 40px); letter-spacing: -.04em; line-height: 1.08; }
.account-auth-info > p { max-width: 600px; margin: 0 0 22px; color: #9aa6b9; font-size: 15px; line-height: 1.55; }
.account-auth-benefits { display: grid; gap: 12px; max-width: 620px; }
.account-auth-benefit { display: flex; align-items: center; gap: 11px; padding: 13px 15px; border: 1px solid #23314a; border-radius: 14px; color: #c2ccdd; font-size: 14px; font-weight: 750; }
.account-auth-benefit svg { width: 21px; height: 21px; flex: 0 0 21px; fill: none; stroke: #c2ccdd; stroke-width: 1.8; }
.account-auth-footnote { margin-top: 29px !important; color: #8896aa !important; font-size: 14px !important; }
.account-auth-form-panel { position: relative; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: clamp(24px, 3.4vw, 54px); }
.account-auth-close { position: absolute; top: 23px; right: 24px; width: 40px; height: 40px; border: 1px solid #26344c; border-radius: 12px; background: #121e33; color: #aab7ca; font-size: 22px; }
.account-auth-form-panel h2 { margin: 0 0 8px; font-size: 30px; letter-spacing: -.04em; }
.account-auth-description { margin: 0 0 22px; color: #9aa6b9; font-size: 15px; line-height: 1.5; }
.account-auth-form { display: grid; gap: 15px; }
.account-auth-field { display: grid; gap: 9px; color: #aeb9cb; font-size: 15px; font-weight: 700; }
.account-auth-field small { color: #8291a7; font-size: 12px; font-weight: 500; line-height: 1.5; }
.account-auth-field input { width: 100%; min-width: 0; min-height: 54px; padding: 0 16px; border: 1px solid #c7d8f5; border-radius: 14px; outline: none; background: #e7effd; color: #101827; font-size: 15px; }
.account-auth-field input:focus { border-color: #70a5ff; box-shadow: 0 0 0 3px #3882ff33; }
.account-auth-submit { min-height: 56px; margin-top: 3px; border: 0; border-radius: 14px; background: linear-gradient(180deg, #3d84ff, #2863ec); color: #fff; font-size: 17px; font-weight: 850; box-shadow: 0 10px 28px #2165e94a; }
.account-auth-links { display: grid; justify-items: center; gap: 13px; margin-top: 22px; color: #99a7bb; font-size: 14px; }
.account-auth-link { border: 0; background: none; color: #b9d5ff; font: inherit; font-weight: 800; }
.account-auth-message { min-height: 20px; margin: 15px 0 0; color: #83dfa2; font-size: 13px; line-height: 1.5; }
.account-auth-demo { margin: 19px 0 0; color: #75849a; font-size: 11px; line-height: 1.5; text-align: center; }
.account-auth-footer { padding: 12px 0 3px; color: #738096; font-size: 13px; text-align: center; }

.cabinet-app { width: 100%; height: 100%; min-height: 0; display: grid; grid-template-columns: minmax(230px, 290px) minmax(0, 1fr); overflow: hidden; background: #0e172a; }
.cabinet-sidebar, .cabinet-workspace, .cabinet-main { min-width: 0; }
.cabinet-sidebar { display: flex; flex-direction: column; min-height: 0; padding: 16px; border-right: 1px solid #202d43; background: #0a1424; }
.cabinet-identity { display: flex; align-items: center; gap: 15px; min-height: 76px; padding: 0 0 16px; border-bottom: 1px solid #202d43; }
.cabinet-avatar { width: 54px; height: 54px; display: grid; place-items: center; border: 2px solid #687388; border-radius: 18px; color: #f5f7fc; font-size: 20px; font-weight: 850; }
.cabinet-identity strong { display: block; font-size: 20px; }
.cabinet-identity span { display: block; margin-top: 4px; color: #8d9bb0; font-size: 14px; }
.cabinet-nav { display: grid; gap: 7px; margin-top: 17px; }
.cabinet-nav-button { min-width: 0; min-height: 49px; display: flex; align-items: center; gap: 11px; padding: 0 13px; border: 1px solid transparent; border-radius: 13px; background: transparent; color: #9da9bb; text-align: left; text-decoration: none; font-size: 14px; font-weight: 700; cursor: pointer; }
.cabinet-nav-button:hover { background: #101d31; color: #eaf1ff; }
.cabinet-nav-button.cabinet-admin-link { margin-top: 8px; border-color: #44345d; background: #19152a; color: #d7bdff; }
.cabinet-nav-button.cabinet-admin-link:hover { border-color: #7555a3; background: #241a38; color: #f2e6ff; }
.cabinet-nav-button.active { position: relative; border-color: #294b7c; background: #112543; color: #f1f6ff; box-shadow: inset 4px 0 #5d8cff; }
.cabinet-nav-icon { width: 24px; text-align: center; color: #a9b5c8; font-size: 20px; }
.cabinet-sidebar-bottom { margin-top: auto; padding-top: 20px; }
.cabinet-logout { width: 100%; min-height: 52px; border: 0; background: none; color: #9da9bb; text-align: left; font-size: 16px; font-weight: 750; }
.cabinet-workspace { display: grid; grid-template-rows: 56px minmax(0, 1fr); background-color: #0e172a; background-image: radial-gradient(#ffffff0c .8px, transparent .8px); background-size: 20px 20px; }
.cabinet-topbar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 0 20px; border-bottom: 1px solid #202d43; background: #0c1526cc; }
.cabinet-topbar-email { max-width: min(48vw, 360px); overflow: hidden; color: #a7b2c4; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.cabinet-close { width: 38px; height: 38px; border: 1px solid #29364c; border-radius: 12px; background: #121e31; color: #a9b6c9; font-size: 22px; }
.cabinet-main { overflow: auto; padding: clamp(18px, 2vw, 30px); }
.cabinet-page { display: none; max-width: 1600px; margin-inline: auto; }
.cabinet-page.active { display: block; }
.cabinet-welcome { margin-bottom: 23px; padding: 18px 22px; border: 1px solid #b6ddcf; border-radius: 10px; background: #d2eadf; color: #164533; font-size: 17px; }
.cabinet-page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 23px; }
.cabinet-page-header h1 { margin: 0; font-size: clamp(25px, 2.4vw, 32px); letter-spacing: -.04em; }
.cabinet-page-header p { margin: 7px 0 0; color: #97a3b5; font-size: 16px; }
.cabinet-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.cabinet-button { min-height: 47px; padding: 0 17px; border: 1px solid #2a3a54; border-radius: 14px; background: #111e33; color: #e8effc; font-size: 14px; font-weight: 800; }
.cabinet-button.primary { border-color: #3478f6; background: linear-gradient(180deg, #3d84ff, #2863ec); box-shadow: 0 8px 24px #2165e930; }
.cabinet-button:hover { filter: brightness(1.12); }
.cabinet-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; margin-bottom: 24px; }
.cabinet-metric, .cabinet-panel { min-width: 0; padding: 19px; border: 1px solid #1a2940; border-radius: 19px; background: linear-gradient(150deg, #101b2e, #0c1728); }
.cabinet-metric-label { color: #9ca8ba; font-size: 15px; }
.cabinet-metric-value { display: block; margin-top: 7px; overflow-wrap: anywhere; color: #f0f4ff; font-size: clamp(18px, 1.6vw, 24px); font-weight: 850; letter-spacing: -.035em; }
.cabinet-metric-note { display: block; margin-top: 14px; color: #929eb1; font-size: 13px; line-height: 1.5; }
.cabinet-columns { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: 16px; }
.cabinet-columns > :only-child { grid-column: 1 / -1; }
.cabinet-panel { padding: 20px; }
.cabinet-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.cabinet-panel-header h2 { margin: 0; font-size: 22px; letter-spacing: -.03em; }
.cabinet-inline-link { min-height: 43px; display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid #29364e; border-radius: 13px; background: #111c2e; color: #dce6f7; font-size: 14px; font-weight: 750; text-decoration: none; }
.cabinet-server-row, .cabinet-operation-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 17px 19px; border: 1px solid #26344a; border-radius: 20px; background: #172338; }
.cabinet-server-row + .cabinet-server-row, .cabinet-operation-row + .cabinet-operation-row { margin-top: 11px; }
.cabinet-server-title { font-size: 17px; font-weight: 850; }
.cabinet-server-meta, .cabinet-operation-meta { margin-top: 5px; color: #9ba7b9; font-size: 13px; }
.cabinet-pill { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border-radius: 999px; background: #122c44; color: #9dd2ff; font-size: 12px; font-weight: 800; white-space: nowrap; }
.cabinet-pill.frozen { background: #4b3907; color: #ffcf38; }
.cabinet-empty { padding: 32px 14px; color: #939fb2; text-align: center; line-height: 1.6; }
.cabinet-empty strong { display: block; margin-bottom: 7px; color: #e7edf8; font-size: 16px; }
.cabinet-page-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.cabinet-plan-card { display: flex; flex-direction: column; min-width: 0; padding: 23px; border: 1px solid #1d2b41; border-radius: 21px; background: linear-gradient(150deg, #121e32, #0c1728); }
.cabinet-plan-card h2 { margin: 0; font-size: 21px; }
.cabinet-plan-description { margin: 7px 0 15px; color: #9ba7b9; font-size: 14px; }
.cabinet-plan-price { margin-bottom: 12px; color: #f1f4fb; font-size: 29px; font-weight: 850; }
.cabinet-plan-specs { margin: 0 0 18px; padding: 14px; border: 1px solid #2a374c; border-radius: 16px; background: #1a2639; color: #aab5c6; font-size: 13px; line-height: 1.8; }
.cabinet-plan-specs strong { float: right; color: #f1f4fb; }
.cabinet-plan-card .cabinet-button { width: 100%; margin-top: auto; }
.cabinet-form { display: grid; gap: 14px; max-width: 760px; }
.cabinet-form label { display: grid; gap: 7px; color: #aab5c6; font-size: 14px; font-weight: 700; }
.cabinet-form input, .cabinet-form textarea, .cabinet-form select { width: 100%; min-height: 49px; padding: 12px 14px; border: 1px solid #2a3850; border-radius: 13px; outline: none; background: #0b1526; color: #edf3ff; font: inherit; }
.cabinet-form textarea { min-height: 120px; resize: vertical; }
.cabinet-table-wrap { overflow-x: auto; }
.cabinet-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.cabinet-table th, .cabinet-table td { padding: 15px 12px; border-bottom: 1px solid #26344a; text-align: left; }
.cabinet-table th { color: #8997ac; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.cabinet-table td { color: #dce5f4; font-size: 14px; }
.cabinet-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.cabinet-alert { margin: 15px 0 0; color: #e7c875; font-size: 13px; line-height: 1.55; }
.cabinet-signout { color: #ff9292; }
.coder-overview { margin-bottom: 17px; }
.coder-notice { align-self: stretch; }
.coder-notice h2 { margin: 0; font-size: 19px; }
.coder-notice .cabinet-plan-description { margin-top: 12px; line-height: 1.6; }
.coder-editor-panel { padding: 16px; }
.coder-toolbar { align-items: flex-end; flex-wrap: wrap; margin-bottom: 13px; }
.coder-file-label { display: grid; gap: 7px; min-width: min(100%, 260px); color: #aab5c6; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.coder-file-label select { min-height: 43px; padding: 0 12px; border: 1px solid #2a3850; border-radius: 11px; background: #0b1526; color: #edf3ff; font: 600 14px ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; text-transform: none; }
.coder-actions { justify-content: flex-end; }
.coder-actions .cabinet-button { min-height: 43px; padding-inline: 13px; }
.coder-editor { display: block; width: 100%; min-height: 390px; padding: 18px; resize: vertical; border: 1px solid #263650; border-radius: 14px; outline: none; background: #080f1d; color: #dce8fb; font: 14px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; tab-size: 4; white-space: pre; }
.coder-editor:focus { border-color: #4c85ed; box-shadow: 0 0 0 3px #3882ff22; }
.coder-status { min-height: 18px; margin: 10px 2px 0; color: #8997ac; font-size: 12px; }

@media (max-width: 1100px) {
  .cabinet-app { grid-template-columns: 270px minmax(0, 1fr); }
  .cabinet-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cabinet-page-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  dialog.account-portal { width: calc(100vw - 16px); height: calc(100dvh - 16px); border-radius: 18px; }
  .account-auth-card { grid-template-columns: 1fr; }
  .account-auth-info { padding: 30px 25px; border-right: 0; border-bottom: 1px solid #202d44; }
  .account-auth-info h1 { font-size: 34px; }
  .account-auth-info > p { font-size: 14px; }
  .account-auth-benefits { grid-template-columns: 1fr; }
  .account-auth-footnote { display: none; }
  .account-auth-form-panel { padding: 36px 25px; }
  .cabinet-app { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .cabinet-sidebar { padding: 10px 14px; border-right: 0; border-bottom: 1px solid #202d43; }
  .cabinet-identity { display: none; }
  .cabinet-nav { display: flex; overflow-x: auto; gap: 6px; margin: 0; }
  .cabinet-nav-button { min-height: 42px; flex: 0 0 auto; gap: 7px; padding: 0 12px; border-radius: 12px; font-size: 13px; }
  .cabinet-nav-icon { width: auto; font-size: 15px; }
  .cabinet-nav-button.active { box-shadow: inset 0 -3px #5d8cff; }
  .cabinet-sidebar-bottom { display: none; }
  .cabinet-workspace { grid-template-rows: 48px minmax(0, 1fr); }
  .cabinet-topbar { padding: 0 14px; }
  .cabinet-main { padding: 17px 14px; }
  .cabinet-page-header { align-items: flex-start; flex-direction: column; }
  .cabinet-actions { width: 100%; }
  .cabinet-button { flex: 1; }
  .cabinet-metrics, .cabinet-columns, .cabinet-page-grid, .cabinet-settings-grid { grid-template-columns: 1fr; }
  .cabinet-metric, .cabinet-panel { padding: 19px; border-radius: 18px; }
  .coder-editor { min-height: 300px; padding: 13px; font-size: 13px; }
  .coder-actions { width: 100%; justify-content: stretch; }
  .coder-actions .cabinet-button { flex: 1 1 calc(50% - 8px); }
}
