:root {
  --bg: #fff7e8;
  --paper: rgba(255, 252, 244, 0.9);
  --paper-strong: rgba(255, 255, 255, 0.96);
  --line: rgba(32, 25, 61, 0.12);
  --text: #20193d;
  --muted: #5d5875;
  --orange: #ff8f3d;
  --orange-deep: #f06322;
  --shadow: 0 20px 48px rgba(47, 32, 11, 0.14);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --max-width: 1160px;
  --success-bg: rgba(17, 182, 166, 0.14);
  --success-text: #0b6b62;
  --error-bg: rgba(240, 99, 34, 0.14);
  --error-text: #a04218;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  font-family: "Onest", "Segoe UI", sans-serif;
  font-weight: 600;
  background:
    radial-gradient(circle at 12% 14%, rgba(255, 216, 92, 0.42), transparent 22%),
    radial-gradient(circle at 84% 18%, rgba(17, 182, 166, 0.18), transparent 18%),
    linear-gradient(180deg, #fff9ee 0%, #fff4de 52%, #fff8ef 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.auth-shell {
  min-height: 100svh;
  padding: 22px 16px 40px;
}

.auth-topbar {
  width: min(var(--max-width), 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(32, 25, 61, 0.08);
  box-shadow: 0 12px 30px rgba(32, 25, 61, 0.08);
}

.language-switches {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.language-button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(32, 25, 61, 0.08);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 22px rgba(32, 25, 61, 0.07);
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    opacity 180ms ease;
}

.language-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.language-button:hover,
.language-button:focus-visible,
.language-button.is-active {
  transform: translateY(-2px) scale(1.04);
  border-color: rgba(240, 99, 34, 0.3);
  box-shadow: 0 16px 28px rgba(32, 25, 61, 0.12);
  outline: none;
}

.language-button:not(.is-active) {
  opacity: 0.52;
  filter: saturate(0.72);
}

.language-button.is-bouncing {
  animation: langBounce 420ms ease;
}

.auth-topbar-right {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 12px;
}

.auth-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.auth-nav a {
  padding: 10px 14px;
  border-radius: 14px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 800;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.auth-nav a:hover,
.auth-nav a:focus-visible {
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  transform: translateY(-1px);
  outline: none;
}

.auth-main {
  width: min(var(--max-width), 100%);
  margin: 28px auto 0;
}

.auth-page-center {
  min-height: calc(100svh - 180px);
  display: flex;
  align-items: center;
}

.cabinet-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.cabinet-sidebar {
  position: sticky;
  top: 22px;
  display: grid;
  gap: 16px;
}

.cabinet-title {
  margin: 16px 0 0;
  font-family: "Unbounded", "Segoe UI", sans-serif;
  font-size: 1.6rem;
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.cabinet-subtitle {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.cabinet-nav {
  display: grid;
  gap: 8px;
}

.cabinet-nav-wrap {
  position: relative;
  min-width: 0;
}

.cabinet-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: 15px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 800;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.cabinet-nav a:hover,
.cabinet-nav a:focus-visible,
.cabinet-nav a.is-active {
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  transform: translateY(-1px);
  outline: none;
}

.cabinet-content {
  min-width: 0;
}

.flash-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.flash {
  padding: 14px 16px;
  border-radius: 18px;
  font-size: 0.96rem;
  line-height: 1.5;
}

.flash-success {
  background: var(--success-bg);
  color: var(--success-text);
}

.flash-error {
  background: var(--error-bg);
  color: var(--error-text);
}

.auth-card {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 32px;
  border-radius: var(--radius-xl);
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow);
}

.auth-card-wide {
  width: 100%;
  max-width: none;
}

.cabinet-page-shell {
  display: grid;
  gap: 24px;
}

.cabinet-page-shell > * {
  margin-top: 0 !important;
}

.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(32, 25, 61, 0.08);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.auth-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
}

.auth-copy h1,
.cabinet-head h1 {
  margin: 18px 0 0;
  font-family: "Unbounded", "Segoe UI", sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.auth-copy p,
.cabinet-head p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 0.95rem;
  font-weight: 800;
}

.field input {
  min-height: 56px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper-strong);
  color: var(--text);
  font: inherit;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.field input:focus {
  outline: none;
  border-color: rgba(240, 99, 34, 0.42);
  box-shadow: 0 0 0 4px rgba(240, 99, 34, 0.1);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 14px 20px;
  border: 0;
  border-radius: 18px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.button-compact {
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 16px;
  font-size: 0.95rem;
}

.user-menu {
  position: relative;
  min-width: 0;
}

.user-menu-toggle {
  max-width: min(320px, 48vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 200px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(32, 25, 61, 0.08);
  box-shadow: 0 18px 34px rgba(32, 25, 61, 0.12);
  display: grid;
  gap: 6px;
  z-index: 20;
}

.user-menu-link {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 800;
  transition: background-color 180ms ease, transform 180ms ease;
}

.user-menu-link:hover,
.user-menu-link:focus-visible,
.user-menu-link-button:hover,
.user-menu-link-button:focus-visible {
  background: rgba(255, 247, 232, 0.9);
  transform: translateY(-1px);
  outline: none;
}

.user-menu-link-button {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.button-primary {
  color: #fffaf4;
  background: linear-gradient(180deg, var(--orange) 0%, var(--orange-deep) 100%);
  box-shadow: 0 14px 26px rgba(240, 99, 34, 0.28);
}

.button-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(32, 25, 61, 0.08);
}

.button-danger {
  color: #fffaf4;
  background: linear-gradient(180deg, #dc4c3f 0%, #b92d20 100%);
  box-shadow: 0 14px 26px rgba(185, 45, 32, 0.22);
}

.auth-footer {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
}

.auth-footer a {
  color: var(--orange-deep);
  font-weight: 800;
}

.cabinet-head {
  display: flex;
  align-items: start;
  justify-content: flex-start;
  gap: 20px;
}

.cabinet-head p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.cabinet-head-keys {
  margin-bottom: 16px;
}

.cabinet-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 26px;
}

.cabinet-grid-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cabinet-panel {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(32, 25, 61, 0.08);
}

.cabinet-label {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.cabinet-panel strong {
  display: block;
  margin-top: 10px;
  font-size: 1.06rem;
  line-height: 1.5;
}

.cabinet-section-title {
  margin: 0;
  font-family: "Unbounded", "Segoe UI", sans-serif;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.cabinet-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.cabinet-stack {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.cabinet-section-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(32, 25, 61, 0.08);
  box-shadow: 0 12px 24px rgba(32, 25, 61, 0.06);
}

.cabinet-section-card h3 {
  margin: 0;
  font-family: "Unbounded", "Segoe UI", sans-serif;
  font-size: 1.08rem;
  line-height: 1.15;
}

.cabinet-section-card p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.7;
}

.cabinet-section-card-danger {
  border-color: rgba(185, 45, 32, 0.18);
  background: rgba(255, 248, 247, 0.92);
}

.cabinet-danger-note {
  color: #9d3126 !important;
  font-weight: 700;
}

.cabinet-key-hero {
  display: grid;
  gap: 18px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(32, 25, 61, 0.08);
  box-shadow: 0 12px 24px rgba(32, 25, 61, 0.06);
}

.cabinet-key-card {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.cabinet-key-copy p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.cabinet-key-copy .cabinet-label {
  margin-bottom: 12px;
}

.cabinet-key-shell {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.cabinet-key-shell-compact {
  gap: 16px;
}

.cabinet-key-value-row {
  position: relative;
  min-width: 0;
}

.cabinet-key-value {
  overflow-x: auto;
  padding: 16px 58px 16px 18px;
  border-radius: 18px;
  background: #231d40;
  color: #f8f7ff;
  font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.6;
}

.cabinet-key-icon-button {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(248, 247, 255, 0.76);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.cabinet-key-icon-button:hover,
.cabinet-key-icon-button:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  outline: none;
}

.cabinet-key-icon-button.is-copied {
  background: rgba(46, 173, 102, 0.2);
  color: #55d38c;
}

.cabinet-copy-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cabinet-copy-icon svg {
  width: 18px;
  height: 18px;
}

.cabinet-copy-icon-success {
  display: none;
}

.cabinet-key-icon-button.is-copied .cabinet-copy-icon-default {
  display: none;
}

.cabinet-key-icon-button.is-copied .cabinet-copy-icon-success {
  display: inline-flex;
}

.cabinet-key-actions,
.cabinet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cabinet-code-tabs {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.cabinet-code-tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cabinet-code-tab {
  padding: 10px 14px;
  border: 1px solid rgba(32, 25, 61, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.cabinet-code-tab:hover,
.cabinet-code-tab:focus-visible {
  border-color: rgba(240, 99, 34, 0.24);
  color: var(--text);
  outline: none;
}

.cabinet-code-tab.is-active {
  border-color: rgba(240, 99, 34, 0.3);
  background: rgba(240, 99, 34, 0.1);
  color: var(--orange-deep);
}

.cabinet-code-panels {
  display: grid;
  min-width: 0;
}

.cabinet-code-panel[hidden] {
  display: none;
}

.cabinet-code-panel {
  min-width: 0;
  overflow: hidden;
}

.cabinet-code-block {
  margin: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(30, 25, 52, 0.96);
  color: #f8f7ff;
  font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.7;
}

.cabinet-code-block code {
  display: inline-block;
  min-width: max-content;
  color: inherit;
}

.cabinet-code-block .code-keyword {
  color: #ffb86c;
}

.cabinet-code-block .code-string {
  color: #a5f3a1;
}

.cabinet-code-block .code-call {
  color: #84d7ff;
}

.cabinet-code-block .code-number {
  color: #ffd580;
}

.cabinet-code-block .code-flag {
  color: #f7a8ff;
}

.cabinet-code-block .code-comment {
  color: rgba(206, 212, 255, 0.55);
}

.cabinet-empty-callout {
  margin-top: 24px;
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.84);
  border: 1px dashed rgba(32, 25, 61, 0.14);
}

.cabinet-empty-callout strong {
  display: block;
  font-size: 1rem;
}

.cabinet-empty-callout p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.cabinet-empty-callout .button {
  margin-top: 16px;
}

.cabinet-key-note {
  display: grid;
  gap: 16px;
}

.cabinet-key-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.cabinet-table-wrap-compact {
  margin-top: 0;
  overflow-x: visible;
}

.cabinet-table-wrap-compact .cabinet-table {
  min-width: 0;
  table-layout: fixed;
}

.cabinet-table-wrap-compact .cabinet-table th,
.cabinet-table-wrap-compact .cabinet-table td {
  word-break: break-word;
}

.cabinet-note-text {
  font-size: 0.96rem;
}

.cabinet-form {
  margin-top: 20px;
}

.cabinet-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.cabinet-list {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.cabinet-list-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(32, 25, 61, 0.08);
}

.cabinet-toolbar {
  display: flex;
  align-items: end;
  gap: 14px;
  margin-top: 24px;
}

.cabinet-toolbar-field {
  flex: 1 1 320px;
}

.cabinet-table-wrap {
  margin-top: 24px;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(32, 25, 61, 0.08);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 24px rgba(32, 25, 61, 0.06);
}

.cabinet-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.cabinet-table th,
.cabinet-table td {
  padding: 15px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(32, 25, 61, 0.08);
}

.cabinet-table th {
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cabinet-table td {
  font-size: 0.95rem;
  line-height: 1.6;
}

.cabinet-table tbody tr:last-child td {
  border-bottom: 0;
}

.cabinet-table-link {
  color: var(--orange-deep);
  font-weight: 800;
}

.cabinet-admin-section {
  margin-top: 24px;
}

.cabinet-admin-settings-card {
  display: grid;
  gap: 18px;
}

.cabinet-settings-grid {
  margin-top: 2px;
}

.cabinet-settings-field {
  min-width: 0;
}

.cabinet-settings-field span {
  color: var(--text);
}

.cabinet-settings-field input {
  width: 100%;
  min-width: 0;
  min-height: 58px;
  padding: 16px 18px;
  border: 1px solid rgba(32, 25, 61, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.cabinet-settings-field input:focus {
  outline: none;
  border-color: rgba(240, 99, 34, 0.42);
  box-shadow:
    0 0 0 4px rgba(240, 99, 34, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

.cabinet-plan-card {
  margin-top: 24px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(32, 25, 61, 0.08);
  box-shadow: 0 12px 24px rgba(32, 25, 61, 0.06);
}

.cabinet-plan-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.cabinet-plan-head h3 {
  margin: 10px 0 0;
  font-family: "Unbounded", "Segoe UI", sans-serif;
  font-size: 1.08rem;
  line-height: 1.15;
}

.cabinet-plan-price {
  font-family: "Unbounded", "Segoe UI", sans-serif;
  font-size: 1.5rem;
  line-height: 1;
  white-space: nowrap;
}

.cabinet-plan-price span {
  font-family: "Onest", "Segoe UI", sans-serif;
  font-size: 0.92rem;
  color: var(--muted);
}

.cabinet-plan-points {
  margin: 18px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.8;
}

.cabinet-transactions {
  margin-top: 18px;
}

.cabinet-subsection-title {
  margin: 0;
  font-family: "Unbounded", "Segoe UI", sans-serif;
  font-size: 1.02rem;
  line-height: 1.15;
}

.cabinet-contact-link {
  display: inline-block;
  color: var(--orange-deep);
  font-size: 1.02rem;
  font-weight: 800;
  word-break: break-word;
}

.cabinet-contact-list {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.cabinet-contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(32, 25, 61, 0.08);
}

.cabinet-contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 14px;
  background: rgba(255, 247, 232, 0.92);
  font-size: 1.2rem;
}

.cabinet-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.cabinet-quick-card {
  display: block;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(32, 25, 61, 0.05);
  box-shadow: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.cabinet-quick-card:hover,
.cabinet-quick-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(32, 25, 61, 0.1);
  box-shadow: none;
  outline: none;
}

.cabinet-quick-label {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.cabinet-quick-card strong {
  display: block;
  margin-top: 10px;
  font-size: 1rem;
  line-height: 1.5;
}

.cabinet-overview-hero {
  background:
    radial-gradient(circle at top right, rgba(255, 216, 92, 0.22), transparent 28%),
    rgba(255, 255, 255, 0.84);
}

.cabinet-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.cabinet-overview-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(32, 25, 61, 0.07);
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.cabinet-overview-card:hover,
.cabinet-overview-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(32, 25, 61, 0.12);
  background: rgba(255, 255, 255, 0.78);
  outline: none;
}

.cabinet-overview-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(255, 247, 232, 0.92);
  color: var(--orange-deep);
  font-size: 1.1rem;
  font-weight: 800;
}

.cabinet-overview-card strong {
  display: block;
  font-size: 1.08rem;
  line-height: 1.4;
}

.cabinet-overview-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.cabinet-inline-id {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(32, 25, 61, 0.08);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

@keyframes langBounce {
  0% {
    transform: translateY(0) scale(1);
  }
  40% {
    transform: translateY(-5px) scale(1.08);
  }
  100% {
    transform: translateY(-2px) scale(1.04);
  }
}

@media (max-width: 780px) {
  .auth-topbar,
  .auth-topbar-right,
  .cabinet-head {
    align-items: start;
    flex-direction: column;
  }

  .auth-topbar-right,
  .cabinet-sidebar {
    width: 100%;
  }

  .language-switches {
    justify-content: center;
  }

  .auth-card {
    padding: 24px;
  }

  .cabinet-shell,
  .cabinet-grid,
  .cabinet-form-grid,
  .cabinet-list-card,
  .cabinet-quick-actions,
  .cabinet-overview-grid {
    grid-template-columns: 1fr;
  }

  .cabinet-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .cabinet-plan-head {
    flex-direction: column;
  }

  .cabinet-settings-grid {
    grid-template-columns: 1fr;
  }

  .cabinet-sidebar {
    position: static;
  }

  .cabinet-shell {
    gap: 16px;
  }

  .cabinet-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    padding: 0 24px 4px;
    scrollbar-width: none;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
  }

  .cabinet-nav::-webkit-scrollbar {
    display: none;
  }

  .cabinet-nav a {
    flex: 0 0 auto;
    white-space: nowrap;
    scroll-snap-align: center;
  }

  .cabinet-nav-wrap::before,
  .cabinet-nav-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 4px;
    width: 28px;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 180ms ease;
  }

  .cabinet-nav-wrap::before {
    left: 0;
    background:
      linear-gradient(90deg, rgba(255, 244, 222, 0.98) 0%, rgba(255, 244, 222, 0) 100%);
  }

  .cabinet-nav-wrap::after {
    right: 0;
    background:
      linear-gradient(270deg, rgba(255, 244, 222, 0.98) 0%, rgba(255, 244, 222, 0) 100%);
  }

  .cabinet-nav-wrap.is-scrollable:not(.is-at-start)::before,
  .cabinet-nav-wrap.is-scrollable:not(.is-at-end)::after {
    opacity: 1;
  }

  .user-menu {
    width: 100%;
  }

  .user-menu-toggle {
    width: 100%;
    max-width: none;
  }

  .user-menu-popover {
    left: 0;
    right: 0;
    min-width: 0;
  }

  .cabinet-key-hero,
  .cabinet-list-card,
  .cabinet-section-card,
  .cabinet-plan-card {
    padding: 20px;
    min-width: 0;
  }

  .cabinet-key-value {
    font-size: 0.88rem;
    line-height: 1.55;
  }

  .cabinet-code-block {
    padding: 16px;
    font-size: 0.84rem;
  }

  .cabinet-section-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .auth-shell {
    padding-inline: 12px;
  }

  .auth-topbar {
    padding: 12px;
  }

  .auth-topbar-right {
    width: 100%;
    gap: 10px;
  }

  .language-switches {
    width: 100%;
    justify-content: center;
  }

  .auth-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-nav a {
    text-align: center;
  }

  .cabinet-nav {
    gap: 8px;
  }

  .cabinet-nav a {
    padding: 11px 13px;
    font-size: 0.9rem;
  }

  .cabinet-key-hero,
  .cabinet-list-card,
  .cabinet-section-card,
  .cabinet-plan-card {
    padding: 18px;
    border-radius: 20px;
  }

  .cabinet-key-value {
    padding: 14px 52px 14px 14px;
    font-size: 0.82rem;
    word-break: break-all;
  }

  .cabinet-key-icon-button {
    right: 10px;
    width: 34px;
    height: 34px;
  }

  .cabinet-code-block {
    padding: 14px;
    font-size: 0.8rem;
  }

  .auth-card {
    padding: 22px 18px;
    border-radius: 24px;
  }

  .auth-page-center {
    min-height: auto;
    align-items: stretch;
  }

  .language-button {
    width: 31px;
    height: 31px;
    border-radius: 10px;
  }
}
