* {
  box-sizing: border-box;
}

:root {
  --bg: #f4f7fb;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-solid: #ffffff;
  --panel-soft: #f8fbff;
  --line: #dbe5f0;
  --line-strong: #c6d5e6;
  --text: #172334;
  --muted: #6b7c93;
  --muted-soft: #90a0b7;
  --brand: #3478f6;
  --brand-strong: #215fd0;
  --brand-soft: #eaf2ff;
  --success: #0f9f6e;
  --success-soft: #e8faf4;
  --warning: #d48a18;
  --warning-soft: #fff6e5;
  --danger: #d94f70;
  --danger-soft: #ffeaf0;
  --shadow-lg: 0 24px 60px rgba(27, 58, 102, 0.12);
  --shadow-md: 0 14px 34px rgba(27, 58, 102, 0.09);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
  background:
    radial-gradient(circle at top left, rgba(52, 120, 246, 0.14), transparent 26%),
    radial-gradient(circle at top right, rgba(93, 173, 226, 0.12), transparent 24%),
    linear-gradient(180deg, #f8fbff 0%, #f4f7fb 38%, #eef3f9 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.14), transparent 60%);
}

body[data-page="login"] {
  background:
    radial-gradient(circle at left top, rgba(52, 120, 246, 0.2), transparent 32%),
    radial-gradient(circle at right bottom, rgba(26, 182, 167, 0.14), transparent 28%),
    linear-gradient(180deg, #eef5ff 0%, #f6f9fd 48%, #edf3fb 100%);
}

body:not([data-page="login"]) {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.console-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0 20px;
}

.page-footer {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 20px;
  padding: 14px 18px 22px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  color: #7b8ba1;
  font-size: 12px;
  border-top: 1px solid rgba(198, 213, 230, 0.72);
}

.page-footer strong {
  color: #52657d;
}

body[data-page="login"] .page-footer {
  width: min(1120px, calc(100% - 32px));
}

body:not([data-page="login"]) .page-footer {
  margin-top: auto;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.auth-card {
  width: min(1120px, 100%);
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
  border: 1px solid rgba(198, 213, 230, 0.72);
  border-radius: 32px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(24px);
}

.auth-card::before {
  content: "";
  grid-column: 1;
  grid-row: 1;
  background:
    radial-gradient(circle at top left, rgba(52, 120, 246, 0.26), transparent 28%),
    radial-gradient(circle at bottom right, rgba(26, 182, 167, 0.18), transparent 24%),
    linear-gradient(160deg, #0f3f91 0%, #245cc6 42%, #4a88ef 100%);
}

.auth-brand,
.auth-form,
.auth-meta-panel {
  position: relative;
  z-index: 1;
}

.auth-brand {
  grid-column: 1;
  grid-row: 1;
  padding: 56px 52px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-brand::before {
  content: "统一支付授权平台";
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 13px;
  letter-spacing: 0.06em;
}

.auth-brand h1 {
  margin: 22px 0 16px;
  font-size: 42px;
  line-height: 1.22;
}

.auth-brand p {
  margin: 0;
  max-width: 520px;
  font-size: 16px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.82);
}

.auth-brand .auth-points {
  display: grid;
  gap: 14px;
  margin-top: 36px;
}

.auth-brand .auth-points span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
}

.auth-brand .auth-points span::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.12);
}

.auth-meta-panel {
  grid-column: 2;
  grid-row: 1;
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
}

.auth-meta-panel .eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 700;
}

.auth-meta-panel h2 {
  margin: 18px 0 10px;
  font-size: 30px;
  color: var(--text);
}

.auth-meta-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.85;
}

.auth-form {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
}

.account-history-anchor {
  position: relative;
}

.account-history-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 60;
  background: var(--panel-solid);
  border: 1px solid rgba(198, 213, 230, 0.92);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  max-height: 260px;
  overflow-y: auto;
}

.account-history-empty {
  padding: 12px 14px;
  color: var(--muted);
  font-size: 13px;
}

.account-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  border-top: 1px solid rgba(219, 229, 240, 0.6);
}

.account-history-item:first-child {
  border-top: none;
}

.account-history-item:hover {
  background: var(--panel-soft);
}

.account-history-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.account-history-account {
  font-weight: 600;
  color: var(--text);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-history-meta {
  font-size: 12px;
  color: var(--muted);
}

button.account-history-delete {
  border: none;
  background: transparent;
  color: var(--muted-soft);
  width: 28px;
  min-width: 28px;
  height: 28px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}

button.account-history-delete:hover {
  color: var(--danger);
  background: rgba(217, 79, 112, 0.12);
}

.auth-form-options {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.auth-form-options .checkbox-field {
  min-height: auto;
}

.sidebar {
  position: sticky;
  top: 18px;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid rgba(198, 213, 230, 0.78);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
  transition: opacity 0.28s ease, transform 0.28s ease;
  transform-origin: top center;
}

.sidebar.sidebar-scroll-hidden {
  opacity: 0;
  transform: translateY(calc(-100% - 28px));
  pointer-events: none;
  visibility: hidden;
}

.sidebar.sidebar-scroll-instant {
  transition: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand::before {
  content: "UniPay";
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand) 0%, #6b9bff 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(52, 120, 246, 0.26);
}

.brand h1 {
  margin: 0;
  font-size: 16px;
  color: var(--text);
}

.brand p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: #44546c;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--brand-strong);
  background: #edf4ff;
}

.nav-link.active {
  color: var(--brand-strong);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px rgba(52, 120, 246, 0.12);
}

.sidebar-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 0;
  border: none;
  background: transparent;
}

.sidebar-title {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.status-text {
  font-size: 13px;
  font-weight: 600;
  color: #44546c;
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-actions,
.header-actions,
.toolbar,
.meta-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sidebar-actions {
  gap: 0;
}

body:not([data-page="login"]) .nav-link[data-nav="login"],
body:not([data-page="login"]) .sidebar-actions a.ghost-button {
  display: none;
}

.content-shell {
  min-width: 0;
  padding: 14px 2px 0;
}

.content-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid rgba(198, 213, 230, 0.72);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top right, rgba(52, 120, 246, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 251, 255, 0.88));
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.content-header::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -50px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(52, 120, 246, 0.12), transparent 62%);
}

.content-header h2 {
  position: relative;
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.content-header p {
  position: relative;
  margin: 0;
  max-width: 720px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 13px;
}

.page-eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.page-title {
  position: relative;
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}

.page-desc {
  position: relative;
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 13px;
}

.page-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
}

.card {
  position: relative;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(198, 213, 230, 0.72);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(251, 253, 255, 0.94));
  box-shadow: var(--shadow-md);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.26), transparent 24%);
}

.card > * {
  position: relative;
}

h3,
.card h2,
.card h3 {
  margin: 0 0 14px;
  font-size: 16px;
  color: var(--text);
}

.section-heading {
  margin-bottom: 12px;
}

.section-heading-with-actions {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

body[data-page="packages"] .section-heading-with-actions {
  align-items: center;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-strong);
  letter-spacing: 0.04em;
}

.section-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  color: var(--text);
}

.section-desc {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 12px;
}

.full-span {
  grid-column: 1 / -1;
}

.simple-section {
  min-width: 0;
  padding: 4px 0 2px;
  border-bottom: 1px solid #e7edf5;
}

.simple-action-list {
  display: grid;
  gap: 8px;
}

.simple-action-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
}

.simple-action-item span {
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.simple-action-item button {
  width: auto;
  min-width: 72px;
}

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

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

.grid-form label,
.mail-setting-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #314357;
}

.form-label,
.mail-setting-label {
  font-size: 13px;
  font-weight: 600;
  color: #314357;
}

.required-label {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.required-mark {
  color: #e53935;
  font-weight: 700;
}

.field-tip {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.product-name-feedback,
.draft-status-bar {
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(234, 242, 255, 0.7);
  border: 1px solid rgba(198, 213, 230, 0.78);
}

.product-name-feedback.is-success {
  color: var(--success);
  background: var(--success-soft);
  border-color: rgba(15, 159, 110, 0.2);
}

.product-name-feedback.is-error {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: rgba(217, 79, 112, 0.22);
}

.package-batch-mode-panel {
  display: grid;
  gap: 4px;
}

.package-batch-section {
  gap: 12px;
}

.package-batch-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.package-batch-list {
  display: grid;
  gap: 12px;
}

.package-batch-item {
  padding: 12px;
  border: 1px solid #e3ebf5;
  border-radius: 14px;
  background: #ffffff;
}

.package-batch-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.package-batch-item-title {
  font-size: 13px;
  font-weight: 600;
  color: #314357;
}

.package-batch-item-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 12px;
}

.package-batch-item-grid label {
  gap: 4px;
}

.package-batch-item-grid .full-width {
  grid-column: 1 / -1;
}

.checkbox-field {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 10px !important;
  min-height: 38px;
}

.checkbox-field input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  margin: 0;
}

.checkbox-field span {
  color: #314357;
  font-size: 13px;
  line-height: 1.7;
}

.full-width {
  grid-column: 1 / -1;
}

.form-section {
  grid-column: 1 / -1;
  padding: 14px;
  border: 1px solid #e7eef7;
  border-radius: 16px;
  background: linear-gradient(180deg, #fbfdff 0%, #f7fbff 100%);
}

.form-section + .form-section {
  margin-top: 2px;
}

.project-import-panel {
  display: grid;
  gap: 12px;
}

.modal-form {
  gap: 14px;
}

.project-import-panel textarea {
  min-height: 180px;
  font-family: "Consolas", "Courier New", monospace;
  line-height: 1.7;
}

.form-section-header {
  margin-bottom: 10px;
}

.form-section-title {
  margin: 0;
  font-size: 15px;
  color: var(--text);
}

.form-section-desc {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

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

.form-section-grid.price-inline-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-section-grid.inline-fields {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px 12px;
  align-items: center;
  width: 100%;
}

.form-section-grid.inline-fields > label,
.inline-field {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  flex: 1 1 0;
  white-space: nowrap;
}

.form-section-grid.inline-fields > label > span,
.inline-field > span {
  font-size: 13px;
  font-weight: 600;
  color: #314357;
  flex: 0 0 auto;
}

.form-section-grid.inline-fields > label > input,
.form-section-grid.inline-fields > label > select,
.inline-field > input,
.inline-field > select {
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
}

.form-section-grid.inline-fields > label.field-medium,
.inline-field.field-medium {
  flex: 1.15 1 0;
}

.form-section-grid.inline-fields > label.field-wide,
.inline-field.field-wide {
  flex: 1.35 1 0;
}

.form-section-grid.inline-fields > label.field-status,
.inline-field.field-status {
  flex: 0.8 1 0;
}

.form-section-grid.inline-fields > label.field-medium > input,
.form-section-grid.inline-fields > label.field-medium > select,
.inline-field.field-medium > input,
.inline-field.field-medium > select {
  width: 100%;
}

.form-section-grid.inline-fields > label.field-status > select,
.form-section-grid.inline-fields > label.field-status > input,
.inline-field.field-status > select,
.inline-field.field-status > input {
  width: 100%;
  min-width: 0;
  padding-right: 28px;
}

.grid-form.compact.inline-fields {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px 12px;
  align-items: center;
  width: 100%;
}

.grid-form.compact.inline-fields > label,
.grid-form.compact.inline-fields > .inline-field {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  flex: 1 1 0;
  white-space: nowrap;
}

.grid-form.compact.inline-fields > label > span,
.grid-form.compact.inline-fields > .inline-field > span {
  font-size: 13px;
  font-weight: 600;
  color: #314357;
  flex: 0 0 auto;
}

.grid-form.compact.inline-fields > label > input,
.grid-form.compact.inline-fields > label > select,
.grid-form.compact.inline-fields > .inline-field > input,
.grid-form.compact.inline-fields > .inline-field > select {
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
}

.grid-form.compact.inline-fields > label.field-medium,
.grid-form.compact.inline-fields > .inline-field.field-medium {
  flex: 1.15 1 0;
}

.grid-form.compact.inline-fields > label.field-wide,
.grid-form.compact.inline-fields > .inline-field.field-wide {
  flex: 1.35 1 0;
}

.grid-form.compact.inline-fields > label.field-status,
.grid-form.compact.inline-fields > .inline-field.field-status {
  flex: 0.8 1 0;
}

.grid-form.compact.inline-fields > .toolbar {
  width: 100%;
  margin-left: 0;
  justify-content: flex-start;
}

.grid-form.compact.inline-fields > .toolbar button {
  min-width: 0;
}

.filter-inline-form {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr) auto;
  gap: 10px;
  align-items: center;
}

.filter-inline-form .inline-field {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.filter-inline-form .inline-field > span {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 600;
  color: #314357;
  white-space: nowrap;
}

.filter-inline-form .inline-field > select,
.filter-inline-form .inline-field > input {
  flex: 1 1 auto;
  min-width: 0;
}

.filter-actions {
  display: flex;
  justify-content: flex-end;
}

.section-heading-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.packages-heading-tools {
  flex: 1 1 auto;
  align-items: flex-end;
  flex-wrap: nowrap;
  gap: 8px;
}

body[data-page="packages"] .section-heading.section-heading-with-actions {
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
}

body[data-page="packages"] .section-heading.section-heading-with-actions > div:first-child {
  flex: 0 0 auto;
  min-width: max-content;
  align-self: center;
}

body[data-page="packages"] #packagesPageTitleText {
  margin: 0;
  white-space: nowrap;
}

body[data-page="packages"] #packagesViewHint:empty {
  display: none;
}

body[data-page="packages"] .packages-heading-tools {
  justify-content: flex-end;
  align-items: center;
  flex: 1 1 auto;
  gap: 10px;
  overflow-x: auto;
  margin-left: auto;
}

body[data-page="packages"] .packages-heading-tools > * {
  align-self: center;
}

.packages-heading-filter {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

body[data-page="packages"] .packages-heading-filter {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 8px;
}

body[data-page="packages"] .packages-heading-filter > *,
body[data-page="packages"] .packages-heading-tools .toolbar > * {
  align-self: center;
}

.packages-heading-filter .inline-field {
  min-width: 0;
  flex: 0 1 auto;
  gap: 6px;
}

body[data-page="packages"] .packages-heading-filter .inline-field {
  width: auto;
  min-width: max-content;
  flex: 0 0 auto;
  align-items: center;
  min-height: 36px;
}

.packages-heading-filter .inline-field > span {
  font-size: 12px;
}

body[data-page="packages"] .packages-heading-filter .inline-field > span {
  display: inline-flex;
  align-items: center;
  height: 36px;
  line-height: 1;
  white-space: nowrap;
}

.packages-heading-filter .inline-field.field-medium {
  width: 192px;
}

.packages-heading-filter .inline-field.field-wide {
  width: 248px;
}

body[data-page="packages"] .packages-heading-filter .inline-field.field-medium,
body[data-page="packages"] .packages-heading-filter .inline-field.field-wide {
  width: auto;
}

.packages-heading-filter .inline-field > select,
.packages-heading-filter .inline-field > input {
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

body[data-page="packages"] .packages-heading-filter .inline-field > select,
body[data-page="packages"] .packages-heading-filter .inline-field > input {
  width: auto;
  min-width: 0;
  flex: 0 0 auto;
  height: 36px;
  align-self: center;
}

body[data-page="packages"] .packages-heading-tools select,
body[data-page="packages"] .packages-heading-tools button,
body[data-page="packages"] .packages-heading-tools a {
  height: 36px;
  min-height: 36px;
  line-height: 34px;
  padding-top: 0;
  padding-bottom: 0;
  margin: 0;
  box-sizing: border-box;
}

body[data-page="packages"] .packages-heading-tools select {
  line-height: 34px;
  padding-left: 12px;
  padding-right: 34px;
}

.packages-heading-filter .filter-actions {
  flex: 0 0 auto;
  align-self: flex-end;
}

body[data-page="packages"] .packages-heading-filter .filter-actions {
  display: flex;
  align-items: center;
  align-self: center;
  min-height: 36px;
}

.packages-heading-filter .filter-actions button {
  min-width: 72px;
  min-height: 34px;
  padding: 0 12px;
}

body[data-page="packages"] .packages-heading-filter .filter-actions button {
  min-width: 0;
  width: auto;
  min-height: 36px;
  align-self: center;
}

.packages-heading-tools .toolbar {
  display: flex;
  align-items: flex-end;
  flex-wrap: nowrap;
  flex: 0 0 auto;
  gap: 6px;
}

body[data-page="packages"] .packages-heading-tools .toolbar {
  align-items: center;
  justify-content: flex-end;
  min-height: 36px;
}

.packages-heading-tools .toolbar a,
.packages-heading-tools .toolbar button {
  min-width: 68px;
  min-height: 34px;
  padding: 0 10px;
}

body[data-page="packages"] .packages-heading-tools .toolbar a,
body[data-page="packages"] .packages-heading-tools .toolbar button {
  min-width: 0;
  width: auto;
  flex: 0 0 auto;
  min-height: 36px;
  align-self: center;
}

body[data-page="packages"] .packages-toolbar-header {
  display: grid;
  gap: 8px;
}

body[data-page="packages"] .packages-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
}

body[data-page="packages"] .packages-toolbar-title {
  flex: 0 0 auto;
  min-width: max-content;
}

body[data-page="packages"] .packages-toolbar-title .section-title {
  margin: 0;
  line-height: 40px;
  white-space: nowrap;
}

body[data-page="packages"] .packages-toolbar-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
  margin-left: auto;
}

body[data-page="packages"] .packages-toolbar-form,
body[data-page="packages"] .packages-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex-wrap: nowrap;
}

body[data-page="packages"] .packages-toolbar-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin: 0;
  white-space: nowrap;
}

body[data-page="packages"] .packages-toolbar-field > span {
  display: inline-flex;
  align-items: center;
  height: 40px;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  color: #314357;
}

body[data-page="packages"] .packages-toolbar-form select,
body[data-page="packages"] .packages-toolbar-form button,
body[data-page="packages"] .packages-toolbar-actions a,
body[data-page="packages"] .packages-toolbar-actions button {
  height: 40px;
  min-height: 40px;
  margin: 0;
  box-sizing: border-box;
  align-self: center;
}

body[data-page="packages"] .packages-toolbar-form select {
  width: auto;
  min-width: 0;
  padding: 0 36px 0 12px;
  font-size: 13px;
}

body[data-page="packages"] .packages-toolbar-form button,
body[data-page="packages"] .packages-toolbar-actions a,
body[data-page="packages"] .packages-toolbar-actions button {
  width: auto;
  min-width: 0;
  padding: 0 14px;
  line-height: 38px;
}

body[data-page="packages"] #packagesViewHint:empty {
  display: none;
}

#packagesTable .table-actions {
  flex-wrap: nowrap;
  gap: 4px;
  justify-content: center;
}

#packagesTable .table-actions button {
  min-width: 56px;
  min-height: 28px;
  padding: 0 8px;
}

#packagesTable .data-table th,
#packagesTable .data-table td {
  text-align: center;
  vertical-align: middle;
}

#projectsTable .table-actions {
  flex-wrap: nowrap;
  justify-content: center;
  gap: 4px;
}

#projectsTable .table-actions button {
  min-width: 0;
  min-height: 28px;
  padding: 0 7px;
  white-space: nowrap;
  font-size: 11px;
}

#projectsTable .data-table col:nth-child(1) {
  width: 12% !important;
}

#projectsTable .data-table col:nth-child(2) {
  width: 16% !important;
}

#projectsTable .data-table col:nth-child(3) {
  width: 13% !important;
}

#projectsTable .data-table col:nth-child(4) {
  width: 17% !important;
}

#projectsTable .data-table col:nth-child(5) {
  width: 8% !important;
}

#projectsTable .data-table col:nth-child(6) {
  width: 34% !important;
}

#projectsTable .project-code-cell,
#projectsTable .project-name-cell,
#projectsTable .project-actions-cell {
  min-width: 0;
}

.project-code-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 5px 10px;
  border-radius: 10px;
  background: #eff4fa;
  color: #274263;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#projectsTable .project-name-main {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.6;
}

#projectsTable .project-actions-cell {
  white-space: nowrap;
}

#projectsTable .project-actions-cell .table-actions {
  white-space: nowrap;
}

body[data-page="projects"] .section-heading-with-actions .toolbar {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
}

body[data-page="projects"] .section-heading-with-actions .toolbar button {
  min-width: 72px;
  min-height: 34px;
  padding: 0 10px;
}

body[data-page="operations"] .section-heading-with-actions {
  align-items: center;
}

body[data-page="operations"] .section-heading-with-actions .toolbar {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
}

body[data-page="operations"] .section-heading-with-actions .toolbar button {
  min-width: 68px;
  min-height: 34px;
  padding: 0 10px;
  white-space: nowrap;
}

body[data-page="operations"] .section-heading-with-actions .toolbar button.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(51, 102, 255, 0.2);
}

body[data-page="operations"] .section-heading-with-actions .toolbar button.active:hover {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  filter: none;
}

body[data-page="operations"] .section-heading {
  margin-bottom: 10px;
}

.operations-query-section {
  padding: 10px 12px;
  border-radius: 14px;
}

.operations-query-fields {
  gap: 8px;
}

.operations-query-fields > .inline-field {
  flex: 0 1 auto;
}

.operations-query-fields > .inline-field.field-medium {
  flex: 1 1 0;
}

.operations-query-fields > .inline-field > span {
  font-size: 12px;
}

.operations-query-fields > .inline-field > input {
  min-width: 0;
}

.operations-filter-hidden {
  display: none !important;
}

#operationsTable .data-table th,
#operationsTable .data-table td {
  text-align: center;
  vertical-align: middle;
}

#operationsTable .data-table col:first-child {
  width: 22px !important;
}

#operationsTable .operations-select-cell,
#operationsTable .data-table th:first-child {
  width: 22px;
}

#operationsTable .data-table th:first-child,
#operationsTable .data-table td:first-child {
  padding-left: 2px;
  padding-right: 2px;
}

#operationsTable .data-table th:first-child {
  padding: 0;
}

#operationsTable input[type="checkbox"] {
  width: 14px;
  height: 14px;
  min-width: 14px;
  min-height: 14px;
}

#operationsTable .operations-orders-table col:nth-child(2) {
  width: 24% !important;
}

#operationsTable .operations-orders-table col:nth-child(3) {
  width: 12% !important;
}

#operationsTable .operations-orders-table col:nth-child(4) {
  width: 10% !important;
}

#operationsTable .operations-orders-table col:nth-child(5) {
  width: 18% !important;
}

#operationsTable .operations-orders-table col:nth-child(6) {
  width: 10% !important;
}

#operationsTable .operations-orders-table col:nth-child(7) {
  width: 16% !important;
}

#operationsTable .operations-orders-table col:nth-child(8) {
  width: 10% !important;
}

#operationsTable .operations-orders-table td:nth-child(2) .cell-code-inline {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  padding: 4px 8px;
}

#operationsTable .operations-licenses-table col:nth-child(2) {
  width: 23% !important;
}

#operationsTable .operations-licenses-table col:nth-child(3) {
  width: 23% !important;
}

#operationsTable .operations-licenses-table col:nth-child(4) {
  width: 11% !important;
}

#operationsTable .operations-licenses-table col:nth-child(5) {
  width: 11% !important;
}

#operationsTable .operations-licenses-table col:nth-child(6) {
  width: 16% !important;
}

#operationsTable .operations-licenses-table col:nth-child(7) {
  width: 10% !important;
}

#operationsTable .operations-emails-table col:nth-child(2) {
  width: 17% !important;
}

#operationsTable .operations-emails-table col:nth-child(3) {
  width: 21% !important;
}

#operationsTable .operations-emails-table col:nth-child(4) {
  width: 11% !important;
}

#operationsTable .operations-emails-table col:nth-child(5) {
  width: 23% !important;
}

#operationsTable .operations-emails-table col:nth-child(6) {
  width: 14% !important;
}

#operationsTable .operations-emails-table col:nth-child(7) {
  width: 10% !important;
}

#operationsTable .table-actions {
  justify-content: center;
  flex-wrap: nowrap;
  gap: 4px;
}

#operationsTable .table-actions button {
  min-width: 56px;
  min-height: 28px;
  padding: 0 8px;
}

body[data-page="payment-scenes"] .section-heading-with-actions .toolbar {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
}

body[data-page="payment-scenes"] .section-heading-with-actions .toolbar button {
  min-width: 72px;
  min-height: 34px;
  padding: 0 10px;
}

#projectsTable .data-table th,
#projectsTable .data-table td {
  text-align: center;
  vertical-align: middle;
}

#paymentScenesTable .table-actions {
  flex-wrap: nowrap;
  justify-content: center;
  gap: 4px;
}

#paymentScenesTable .table-actions button {
  min-width: 56px;
  min-height: 28px;
  padding: 0 8px;
}

#paymentScenesTable .data-table th,
#paymentScenesTable .data-table td {
  text-align: center;
  vertical-align: middle;
}

#paymentScenesTable .data-table col:nth-child(1) {
  width: 22% !important;
}

#paymentScenesTable .data-table col:nth-child(2) {
  width: 22% !important;
}

#paymentScenesTable .data-table col:nth-child(3) {
  width: 18% !important;
}

#paymentScenesTable .data-table col:nth-child(4) {
  width: 18% !important;
}

#paymentScenesTable .data-table col:nth-child(5) {
  width: 20% !important;
}

.payment-debug-core-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.85fr) minmax(0, 0.85fr) minmax(0, 1.1fr);
  gap: 10px;
}

.payment-debug-core-grid > label,
.payment-debug-support-grid > label {
  min-width: 0;
}

.payment-debug-core-grid input,
.payment-debug-core-grid select,
.payment-debug-support-grid input,
.payment-debug-support-grid select {
  min-width: 0;
}

.payment-debug-support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 220px));
  gap: 10px;
  margin-top: 10px;
}

.payment-mode-alert {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid #d9e6f7;
  border-radius: 14px;
  background: #f7fbff;
}

.payment-mode-alert strong {
  color: var(--text);
  font-size: 14px;
}

.payment-mode-alert span {
  color: #52657b;
  font-size: 12px;
  line-height: 1.7;
}

.payment-mode-alert.mode-sandbox {
  border-color: #f4ddab;
  background: #fff8ea;
}

.payment-mode-alert.mode-prod {
  border-color: #f1c3ce;
  background: #fff1f4;
}

.payment-mode-alert.mode-mock {
  border-color: #dbe5f0;
  background: #f4f8fd;
}

.payment-mode-guide {
  padding: 12px 14px;
  border: 1px dashed #d9e6f7;
  border-radius: 14px;
  background: #fbfdff;
  color: #41556d;
  font-size: 12px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.filter-actions button {
  width: auto;
  min-width: 104px;
}

.project-picker {
  position: relative;
  margin-top: 8px;
  min-width: 0;
}

.compact-picker-label {
  min-width: 0;
}

.compact-picker-label .project-picker {
  margin-top: 0;
}

.compact-picker-label select,
.compact-picker-label .project-picker-trigger {
  min-height: 38px;
}

.project-picker-trigger {
  width: 100%;
  min-height: 42px;
  padding: 8px 40px 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: none;
  color: var(--text);
  justify-content: flex-start;
  text-align: left;
  position: relative;
}

.project-picker-trigger::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 2px solid #71839a;
  border-bottom: 2px solid #71839a;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.project-picker.open .project-picker-trigger::after {
  transform: rotate(-135deg);
  margin-top: -2px;
}

.project-picker-value {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
}

.project-picker-placeholder {
  color: #97a5ba;
  font-weight: 400;
}

.project-picker-chip {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.project-picker-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  max-height: 240px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.project-picker-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 10px;
  cursor: pointer;
}

.project-picker-option:hover {
  background: #f5f9ff;
}

.project-picker-option input {
  width: 16px;
  min-width: 16px;
  height: 16px;
  margin: 0;
}

.project-picker-option span {
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
}

.project-picker-empty {
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
}

.asset-field {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.asset-field-grid {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.asset-upload-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: #f8fbff;
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  overflow: hidden;
}

.asset-upload-button input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.asset-field-grid textarea {
  min-height: 84px;
}

form#packageCreateForm > div.form-section:nth-child(2) > div.form-section-grid > div.full-width:nth-child(3) > div.asset-field > div.asset-field-grid > textarea {
  font-size: 14px;
}

form#packageCreateForm > div.form-section:nth-child(2) > div.form-section-grid > div.full-width:nth-child(4) > div.asset-field > div.asset-field-grid > textarea {
  font-size: 14px;
}

form#packageCreateForm > div.form-section:nth-child(2) > div.form-section-grid > div.full-width:nth-child(6) > div.asset-field > div.asset-field-grid > textarea {
  font-size: 14px !important;
}

form#packageCreateForm > div.form-section:nth-child(2) > div.form-section-grid > div.full-width:nth-child(7) > div.asset-field > div.asset-field-grid > textarea {
  font-size: 14px !important;
}

form#packageCreateForm > div.form-section:nth-child(2) > div.form-section-grid > div.full-width:nth-child(6) > div.asset-field > div.asset-field-grid > textarea::placeholder {
  font-size: 14px !important;
}

form#packageCreateForm > div.form-section:nth-child(2) > div.form-section-grid > div.full-width:nth-child(7) > div.asset-field > div.asset-field-grid > textarea::placeholder {
  font-size: 14px !important;
}

.asset-field-status {
  color: #42546c;
  font-size: 12px;
  line-height: 1.7;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.admin-workbench-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 18px;
  align-items: start;
  padding: 20px;
  background:
    radial-gradient(circle at right top, rgba(52, 120, 246, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.95));
}

.admin-workbench-copy,
.admin-workbench-side {
  min-width: 0;
}

.admin-workbench-side .summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#adminMyProfileGrid,
#adminBoundAccountSummary {
  align-items: stretch;
}

#adminMyProfileGrid .summary-card,
#adminBoundAccountSummary .summary-card {
  min-height: 108px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#adminMyProfileGrid .summary-value,
#adminBoundAccountSummary .summary-value {
  margin-top: 4px;
}

#adminBoundAccountSummary,
#adminMyOverviewGrid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#adminMyProfileGrid .summary-card,
#adminBoundAccountSummary .summary-card,
#adminMyOverviewGrid .summary-card {
  background:
    radial-gradient(circle at top right, rgba(52, 120, 246, 0.1), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

#adminBoundAccountSummary .summary-card,
#adminMyOverviewGrid .summary-card,
.admin-my-quick-grid .action-entry-card {
  padding: 10px 12px;
}

#adminMyOverviewGrid .summary-value {
  font-size: 22px;
}

#adminBoundAccountSummary .summary-meta,
#adminMyOverviewGrid .summary-meta {
  display: none;
}

.action-entry-grid.admin-my-quick-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  align-items: stretch;
}

.action-entry-grid.admin-my-quick-grid .action-entry-card {
  gap: 6px;
  min-width: 0;
  padding: 8px 10px;
}

.action-entry-grid.admin-my-quick-grid .action-entry-head h4 {
  font-size: 13px;
  line-height: 1.35;
}

.action-entry-grid.admin-my-quick-grid .action-entry-actions {
  justify-content: flex-start;
}

.action-entry-grid.admin-my-quick-grid .action-entry-actions .ghost-button {
  min-width: 0;
  min-height: 28px;
  padding: 0 7px;
  white-space: nowrap;
  font-size: 12px;
}

#adminOrderTabNav {
  flex-wrap: nowrap;
  gap: 8px;
}

#adminOrderTabNav .admin-order-tab-button {
  flex: 1 1 0;
  min-width: 0;
  justify-content: center;
  padding: 0 10px;
  white-space: nowrap;
}

.admin-bind-heading-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.admin-bind-heading-inline .section-title,
.admin-bind-heading-inline button {
  margin: 0;
}

.admin-bind-heading-inline button {
  width: auto;
  flex: 0 0 auto;
}

.admin-workbench-side .section-heading {
  display: flex;
  align-items: center;
}

.package-table-shell {
  overflow-x: hidden;
}

.package-table {
  table-layout: fixed;
}

.package-table td {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.package-name-cell {
  min-width: 0;
}

.package-name-main {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.6;
}

.package-name-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.package-price-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.package-price-current {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}

.package-price-current.active {
  color: #d14343;
}

.package-price-original {
  font-size: 12px;
  color: #7b8da5;
  text-decoration: line-through;
}

.package-price-meta {
  font-size: 12px;
  color: #6b7f96;
  line-height: 1.5;
}

.summary-card {
  position: relative;
  padding: 12px;
  border: 1px solid #e5edf6;
  border-radius: 14px;
  background:
    radial-gradient(circle at top right, rgba(52, 120, 246, 0.1), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  overflow: hidden;
}

.summary-card::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: rgba(52, 120, 246, 0.08);
}

.summary-label {
  position: relative;
  margin: 0 0 6px;
  font-size: 11px;
  color: var(--muted);
}

.summary-value {
  position: relative;
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 700;
  color: var(--text);
}

.summary-meta {
  position: relative;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

#operationsSummaryGrid > .summary-card:first-child > .summary-value {
  font-size: 16px;
}

#packagesSummaryGrid .summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#packagesSummaryGrid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

#packagesSummaryGrid .summary-card {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
}

#packagesSummaryGrid .summary-card::after {
  display: none;
}

#packagesSummaryGrid .summary-label {
  margin: 0;
  font-size: 12px;
}

#packagesSummaryGrid .summary-value {
  flex: 0 0 auto;
  font-size: 17px;
  line-height: 1.2;
  text-align: right;
}

.section-block {
  margin-top: 14px;
}

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

.info-card {
  padding: 12px;
  border: 1px solid #e5edf6;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.info-card-label {
  color: var(--muted);
  font-size: 12px;
}

.info-card-value {
  margin-top: 6px;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  word-break: break-word;
}

.info-card-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

body[data-page="integration"] .info-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-page="integration"] .integration-checkbox-field {
  justify-content: flex-start;
}

body[data-page="integration"] .integration-checkbox-field input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  flex: 0 0 auto;
  padding: 0;
  border-radius: 4px;
  box-shadow: none;
}

#adminMyBoundAccountDetails {
  grid-template-columns: 1fr;
  gap: 0;
}

#adminMyBoundAccountDetails .info-card {
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid #edf2f7;
  border-radius: 0;
  background: transparent;
}

#adminMyBoundAccountDetails .info-card:last-child {
  border-bottom: 0;
}

#adminMyBoundAccountDetails .info-card-value {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 600;
}

#adminMyBoundAccountDetails .info-card-meta {
  margin-top: 4px;
  font-size: 12px;
}

#adminMyBoundAccountDetails .empty-state {
  padding: 6px 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
}

.action-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.action-entry-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e5edf6;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.action-entry-head h4 {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
  color: var(--text);
}

.action-entry-meta {
  display: inline-block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.action-entry-actions {
  display: flex;
  justify-content: flex-start;
}

.action-entry-actions button {
  width: auto;
  min-width: 84px;
}

.inline-notice {
  padding: 12px 14px;
  border: 1px solid #dbe5f0;
  border-radius: 14px;
  background: #f8fbff;
  color: #36506f;
  line-height: 1.7;
}

.inline-notice.success {
  border-color: #cce9dd;
  background: #f0fbf5;
  color: #16724f;
}

.inline-notice.warning {
  border-color: #f4ddab;
  background: #fff8ea;
  color: #9a6b14;
}

.inline-notice.danger {
  border-color: #f1c3ce;
  background: #fff1f4;
  color: #b7425f;
}

.mail-settings-card {
  padding: 24px 28px;
}

.mail-settings-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 900px;
}

.mail-setting-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
}

.mail-setting-control {
  min-width: 0;
}

.port-stepper,
.field-with-action {
  display: flex;
  align-items: stretch;
}

.port-stepper input,
.field-with-action input {
  border-radius: 0;
}

.port-stepper input {
  width: 104px;
  text-align: center;
  border-left: none;
  border-right: none;
}

.stepper-button,
.inline-icon-button {
  width: auto;
  min-width: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: #f8fbff;
  color: var(--brand-strong);
}

.port-stepper .stepper-button:first-child {
  border-radius: 14px 0 0 14px;
}

.port-stepper .stepper-button:last-child {
  border-radius: 0 14px 14px 0;
}

.field-with-action input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.inline-icon-button {
  border-left: none;
  border-radius: 0 14px 14px 0;
  background: #ffffff;
  color: var(--muted);
}

.mail-settings-actions {
  display: flex;
  gap: 8px;
  padding-left: 0;
  margin-top: 2px;
}

.mail-settings-actions button {
  width: auto;
  min-width: 96px;
}

.debug-key-field {
  display: grid;
  gap: 8px;
}

.debug-key-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.debug-key-field-head label {
  margin: 0;
}

.debug-key-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.debug-key-actions button {
  width: auto;
  min-width: 76px;
  min-height: 34px;
  padding: 0 12px;
}

.payment-debug-form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.payment-debug-form-actions .inline-notice {
  flex: 1 1 360px;
  margin: 0;
  padding: 10px 12px;
}

.payment-debug-form-actions button {
  width: auto;
  min-width: 160px;
}

#paymentDebugSettingsForm.is-readonly input,
#paymentDebugSettingsForm.is-readonly textarea {
  background: #f7f9fc;
  color: #5d7087;
  cursor: default;
}

#paymentDebugSettingsForm.is-readonly select {
  background: #f7f9fc;
  color: #5d7087;
  cursor: not-allowed;
}

#paymentDebugSettingsForm.is-readonly .debug-key-actions button,
#paymentDebugSaveButton[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.payment-debug-test-panel {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.payment-debug-test-controls {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid #e1e9f3;
  border-radius: 16px;
  background: #fbfdff;
}

.payment-debug-test-picker {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 10px !important;
}

.payment-debug-test-picker span {
  flex: 0 0 auto;
  min-width: 64px;
  font-size: 13px;
  font-weight: 600;
  color: #314357;
}

.payment-debug-test-picker select {
  flex: 1 1 auto;
}

.payment-debug-test-steps {
  display: grid;
  gap: 12px;
}

.payment-debug-test-step {
  padding: 14px 16px;
  border: 1px solid #e4edf6;
  border-radius: 16px;
  background: #fbfdff;
}

.payment-debug-test-step.is-success {
  border-color: rgba(39, 174, 96, 0.22);
  background: rgba(39, 174, 96, 0.05);
}

.payment-debug-test-step.is-danger {
  border-color: rgba(208, 67, 67, 0.24);
  background: rgba(208, 67, 67, 0.05);
}

.payment-debug-test-step.is-neutral {
  border-color: rgba(52, 120, 246, 0.18);
}

.payment-debug-test-step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.payment-debug-test-step-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.payment-debug-test-step-detail {
  margin: 10px 0 0;
  color: #405266;
  line-height: 1.7;
  white-space: pre-wrap;
}

.payment-debug-test-step-meta {
  margin: 10px 0 0;
}

.payment-debug-test-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.payment-debug-test-meta-item {
  padding: 8px 12px;
  border-radius: 12px;
  background: #f4f8fd;
  color: #30465e;
  font-size: 12px;
}

.payment-debug-launch-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid #dfe8f2;
  border-radius: 18px;
  background: #fbfdff;
}

.payment-debug-launch-copy {
  min-width: 0;
}

.payment-debug-launch-copy strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.payment-debug-launch-copy p {
  margin: 8px 0 0;
  color: #52657b;
  line-height: 1.7;
  font-size: 13px;
}

.payment-debug-launch-panel button {
  width: auto;
  min-width: 144px;
}

.payment-debug-launch-panel button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 900px) {
  .payment-debug-launch-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .payment-debug-launch-panel button {
    width: 100%;
  }
}

.mail-inline-hidden {
  display: none;
}

input,
select,
textarea,
button {
  width: 100%;
  font: inherit;
}

input,
select,
textarea {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  font-size: 13px;
}

input::placeholder,
textarea::placeholder {
  color: #97a5ba;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(52, 120, 246, 0.52);
  box-shadow: 0 0 0 4px rgba(52, 120, 246, 0.12);
  background: #ffffff;
}

.password-visibility-field {
  position: relative;
  display: block;
  width: 100%;
}

.password-visibility-field > input {
  padding-right: 42px;
}

button.password-visibility-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 28px;
  min-width: 28px;
  max-width: 28px;
  min-height: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  box-shadow: none;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

button.password-visibility-toggle:hover {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.08);
}

button.password-visibility-toggle:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.28);
  outline-offset: 1px;
}

.password-visibility-toggle svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

textarea {
  min-height: 84px;
  resize: vertical;
}

button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand) 0%, #5a90ff 100%);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  box-shadow: 0 12px 24px rgba(52, 120, 246, 0.22);
}

button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
  filter: brightness(0.98);
}

button:active,
.ghost-button:active {
  transform: translateY(0);
}

.secondary-button,
.sidebar-actions button,
.header-actions button,
.toolbar button {
  background: #ffffff;
  color: #2b4264;
  border: 1px solid var(--line);
  box-shadow: none;
}

.sidebar-actions button {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
}

.secondary-button:hover,
.sidebar-actions button:hover,
.header-actions button:hover,
.toolbar button:hover {
  background: #f3f8ff;
}

.ghost-button.secondary-button.is-active,
.toolbar .ghost-button.secondary-button.is-active {
  background: linear-gradient(135deg, var(--brand) 0%, #5a90ff 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(52, 120, 246, 0.18);
}

.danger-button {
  border-color: rgba(217, 79, 112, 0.24);
  background: #fff4f7;
  color: var(--danger);
}

.danger-button:hover {
  background: #ffeaf0;
}

body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(8px);
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal-card {
  width: min(460px, 100%);
  max-height: min(84vh, 760px);
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(198, 213, 230, 0.82);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.96));
  box-shadow: 0 16px 32px rgba(27, 58, 102, 0.12);
}

.modal-card-wide {
  width: min(1040px, 100%);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.modal-header .ghost-button,
.modal-header button {
  width: auto;
  min-width: 60px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  grid-column: 1 / -1;
  margin-top: 2px;
}

.modal-actions button {
  width: auto;
  min-width: 76px;
  min-height: 32px;
  padding: 0 12px;
}

.modal-result {
  grid-column: 1 / -1;
}

.modal-card .grid-form {
  grid-template-columns: 1fr;
  gap: 8px;
}

.modal-card .grid-form label {
  gap: 4px;
  font-size: 12px;
}

.modal-card .grid-form input,
.modal-card .grid-form select,
.modal-card .grid-form textarea {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 9px;
}

.modal-card .section-title {
  font-size: 15px;
}

.modal-card .empty-state,
.modal-card .inline-notice {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.55;
}

.system-dialog-card {
  width: min(520px, 100%);
}

.system-dialog-form {
  display: grid;
  gap: 12px;
}

.system-dialog-header-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.system-dialog-message {
  margin: 0;
  white-space: pre-wrap;
  text-align: left;
}

.system-dialog-field {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--text);
}

.system-dialog-field[hidden] {
  display: none !important;
}

.system-dialog-field input {
  width: 100%;
}

.transient-toast-layer {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
  padding: 20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.transient-toast-layer[hidden] {
  display: none !important;
}

.transient-toast-layer.is-visible {
  opacity: 1;
}

.transient-toast-card {
  max-width: min(420px, calc(100vw - 32px));
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(23, 35, 52, 0.92);
  color: #ffffff;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.transient-toast-layer.is-visible .transient-toast-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.transient-toast-card.success {
  background: rgba(15, 159, 110, 0.94);
}

.transient-toast-card.warning {
  background: rgba(212, 138, 24, 0.95);
}

.transient-toast-card.danger {
  background: rgba(217, 79, 112, 0.94);
}

.transient-toast-card.info {
  background: rgba(52, 120, 246, 0.94);
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.table-actions button {
  width: auto;
  min-width: 72px;
  min-height: 30px;
  padding: 0 10px;
}

.payment-scene-delete-code-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.payment-scene-delete-code-row input {
  flex: 1 1 auto;
}

.payment-scene-delete-code-row button {
  flex: 0 0 auto;
  min-width: 88px;
}

@media (max-width: 1200px) {
  .payment-debug-core-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.meta-row {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.section-tip {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 12px;
}

.empty-state {
  padding: 22px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: #f8fbff;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.mail-template-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.mail-template-preview-card {
  overflow: hidden;
  border: 1px solid rgba(198, 213, 230, 0.72);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(27, 58, 102, 0.06);
}

.mail-template-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #e9eff6;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.mail-template-preview-title {
  min-width: 0;
}

.mail-template-preview-title strong {
  display: block;
  font-size: 14px;
  color: var(--text);
}

.mail-template-preview-title span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.mail-template-preview-head button {
  width: auto;
  min-width: 84px;
}

.mail-template-preview-frame {
  width: 100%;
  height: 300px;
  border: 0;
  display: block;
  background: #ffffff;
}

.json-box,
.cell-code {
  margin: 0;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  background: #0f172a;
  color: #e2edf9;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.7;
}

.rich-editor {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
}

.rich-editor-advanced {
  display: grid;
  gap: 0;
}

.rich-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px;
  background: #f8fbff;
  border-bottom: 1px solid #e8eef5;
}

.rich-toolbar button {
  width: auto;
  min-height: 32px;
  padding: 0 10px;
  background: #edf4ff;
  color: var(--brand-strong);
  box-shadow: none;
}

.rich-toolbar button:hover {
  background: #e3eeff;
}

.rich-toolbar select {
  width: auto;
  min-width: 108px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 10px;
  background: #ffffff;
}

.rich-toolbar-color {
  display: inline-flex !important;
  align-items: center;
  gap: 8px !important;
  width: auto;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #dbe5f0;
  border-radius: 10px;
  background: #ffffff;
}

.rich-toolbar-color span {
  font-size: 12px;
  font-weight: 600;
  color: #41556d;
  white-space: nowrap;
}

.rich-toolbar-color input[type="color"] {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  box-shadow: none;
}

.rich-surface {
  min-height: 240px;
  padding: 12px;
  outline: none;
  line-height: 1.65;
  font-size: 13px;
}

.rich-surface img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 12px 0;
  border-radius: 12px;
}

.rich-surface h2,
.rich-surface h3,
.rich-surface p,
.rich-surface blockquote,
.product-detail-richtext h2,
.product-detail-richtext h3,
.product-detail-richtext p,
.product-detail-richtext blockquote {
  margin-top: 0;
}

.rich-surface blockquote,
.product-detail-richtext blockquote {
  margin: 12px 0;
  padding: 10px 14px;
  border-left: 4px solid #cfe0ff;
  background: #f8fbff;
  color: #52657b;
}

.package-editor-hero {
  background:
    radial-gradient(circle at right top, rgba(52, 120, 246, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.95));
}

.package-editor-form {
  gap: 14px;
}

.package-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.package-editor-actions a,
.package-editor-actions button {
  width: auto;
  min-width: 104px;
}

.product-detail-page {
  padding: 20px;
}

.product-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 20px;
  align-items: start;
}

.product-detail-media,
.product-detail-summary {
  min-width: 0;
}

.product-detail-gallery {
  display: grid;
  gap: 12px;
}

.product-detail-gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid #dbe5f0;
  background: #f8fbff;
}

.product-detail-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}

.product-detail-subtitle {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.8;
}

.product-detail-price-current {
  margin-top: 16px;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  color: #d14343;
}

.product-detail-price-origin {
  margin-top: 8px;
  font-size: 13px;
  color: #7b8da5;
  text-decoration: line-through;
}

.product-detail-meta {
  margin-top: 10px;
  color: #4c6178;
  line-height: 1.75;
}

.product-detail-field {
  display: grid;
  gap: 8px !important;
  margin-top: 12px;
}

.product-detail-field span {
  font-size: 13px;
  font-weight: 600;
  color: #314357;
}

.product-detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.product-detail-actions a,
.product-detail-actions button {
  width: auto;
  min-width: 112px;
}

.product-detail-richtext {
  margin-top: 20px;
  padding: 18px 20px;
  border: 1px solid #e4edf6;
  border-radius: 16px;
  background: #ffffff;
  color: #334155;
  line-height: 1.9;
}

.product-detail-richtext img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.rich-surface:empty::before {
  content: attr(data-placeholder);
  color: var(--muted-soft);
}

[id$="Table"] {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.table-shell {
  width: 100%;
  overflow: hidden;
  border: 1px solid #e6edf5;
  border-radius: 14px;
  background: #fbfdff;
}

.data-table,
table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.data-table thead th,
.table-shell th,
th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 11px 12px;
  background: #f4f8fd;
  color: #516379;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  border-bottom: 1px solid #e5edf6;
  text-align: left;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.data-table td,
td {
  padding: 11px 12px;
  border-bottom: 1px solid #edf2f7;
  color: #203246;
  vertical-align: top;
  line-height: 1.6;
  font-size: 12px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.data-table tbody tr:nth-child(even) td {
  background: rgba(248, 251, 255, 0.72);
}

.data-table tbody tr:hover td {
  background: #f3f8ff;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

body[data-page="users"] .grid-form.compact.inline-fields {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

body[data-page="users"] .grid-form.compact.inline-fields > .inline-field.field-medium {
  flex: 0 0 15%;
  width: 15%;
}

body[data-page="users"] .grid-form.compact.inline-fields > .inline-field > span {
  flex: 0 0 auto;
}

body[data-page="users"] .grid-form.compact.inline-fields > .inline-field > select {
  min-width: 0;
}

body[data-page="users"] .grid-form.compact.inline-fields > .toolbar {
  flex: 0 0 auto;
  margin-left: auto;
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 8px;
  white-space: nowrap;
}

body[data-page="users"] .grid-form.compact.inline-fields > .toolbar button {
  flex: 0 0 auto;
}

.users-table-shell {
  overflow-x: hidden;
}

.user-management-table {
  width: 100%;
  table-layout: fixed;
}

.user-management-table th,
.user-management-table td {
  vertical-align: middle;
  text-align: center;
}

.user-management-table thead th {
  vertical-align: middle;
  text-align: center;
}

.user-name-cell {
  min-width: 0;
}

.package-table .package-select-cell,
.package-table thead th:first-child,
.user-management-table .user-select-cell,
.user-management-table thead th:first-child {
  text-align: center;
}

.package-table .package-select-cell input[type="checkbox"],
.package-table thead th input[data-packages-select-all="true"],
.user-management-table .user-select-cell input[type="checkbox"],
.user-management-table thead th input[data-users-select-all="true"] {
  display: inline-block;
  width: 16px;
  height: 16px;
  vertical-align: middle;
}

.user-name-main {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.6;
  text-align: center;
}

.user-name-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.user-management-table .user-projects-cell {
  color: #314357;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-management-table .user-actions-cell {
  min-width: 0;
  white-space: nowrap;
}

.user-management-table .user-actions-cell .table-actions {
  justify-content: center;
  flex-wrap: nowrap;
  gap: 4px;
  white-space: nowrap;
}

.user-management-table .user-actions-cell .table-actions button {
  min-width: 0;
  padding: 0 6px;
  white-space: nowrap;
  font-size: 12px;
}

.user-validity-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eef4ff;
  color: #2a63d4;
  font-size: 12px;
  font-weight: 700;
}

.user-validity-pill.is-permanent {
  background: #eafaf3;
  color: #0f9f6e;
}

.user-detail-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.user-detail-record-list {
  display: grid;
  gap: 10px;
}

.user-detail-record-card {
  padding: 12px;
  border: 1px solid #e5edf6;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.user-detail-record-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.user-detail-record-title {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.user-detail-record-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  word-break: break-word;
}

.user-amount-cell {
  min-width: 0;
  white-space: nowrap;
}

.user-amount-main {
  font-size: 14px;
  font-weight: 700;
  color: #1d3f78;
  line-height: 1.5;
}

.user-amount-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.status-pill.success {
  background: var(--success-soft);
  color: var(--success);
}

.status-pill.warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-pill.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-pill.neutral {
  background: #eef3f8;
  color: #5d7088;
}

.status-pill.brand {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.product-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.product-center-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #dde7f4;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 24px rgba(23, 35, 52, 0.05);
}

.product-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.product-card-head h4 {
  margin: 0 0 6px;
  font-size: 16px;
}

.product-card-head p,
.product-card-meta,
.product-card-field span,
.product-flow-result-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

.product-card-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.product-card-field {
  display: grid;
  gap: 6px;
}

.product-card-field select {
  min-height: 36px;
  border: 1px solid #d4dfec;
  border-radius: 10px;
  padding: 0 12px;
  background: #ffffff;
  font-size: 13px;
}

.product-project-field {
  display: grid;
  gap: 8px;
}

.product-project-label {
  margin: 0;
  color: #314357;
  line-height: 1.5;
  font-size: 13px;
  font-weight: 600;
}

.product-project-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-project-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #d7e5ff;
  background: #eef4ff;
  color: #2b5fc7;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.product-project-pill.is-default {
  border-color: #2b5fc7;
  background: linear-gradient(135deg, #2b5fc7 0%, #4a7ff0 100%);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(43, 95, 199, 0.18);
}

.product-project-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

.product-card-actions,
.product-flow-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.product-card-state {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #dbe5f0;
  background: #ffffff;
}

.product-card-state.tone-warning {
  border-color: #f4ddab;
  background: #fff8ea;
}

.product-card-state.tone-success {
  border-color: #cce9dd;
  background: #f0fbf5;
}

.product-card-state-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.product-card-state-meta {
  color: var(--muted);
  font-size: 12px;
}

.product-card-inline-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.text-link-button {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  color: var(--brand-strong);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}

.admin-order-tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-order-tab-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #dbe5f0;
  border-radius: 999px;
  background: #f7faff;
  color: var(--muted);
  cursor: pointer;
}

.admin-order-tab-button.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}

.admin-order-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: inherit;
  font-size: 12px;
  font-weight: 700;
}

.admin-order-mixed-list {
  display: grid;
  gap: 14px;
}

.admin-order-table-head,
.admin-order-row-main {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 0.9fr) minmax(220px, 1fr);
  gap: 16px;
}

.admin-order-table-head {
  padding: 0 16px;
  color: #5f728b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  text-transform: none;
}

.admin-order-row-card {
  border: 1px solid #dbe5f0;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.95)),
    #f8fbff;
  box-shadow: 0 14px 30px rgba(23, 35, 52, 0.07);
  overflow: hidden;
}

.admin-order-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid #e8eef6;
  background: linear-gradient(180deg, #f9fbff 0%, #f2f7ff 100%);
}

.admin-order-card-top-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.admin-order-top-label {
  color: #6a7c93;
  font-size: 12px;
  font-weight: 700;
}

.admin-order-top-code {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e9f1ff;
  color: #2f4f7c;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.5;
}

.admin-order-top-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #b3c4db;
}

.admin-order-top-time {
  color: #6e7f95;
  font-size: 12px;
  line-height: 1.5;
}

.admin-order-card-top-side {
  flex: 0 0 auto;
}

.admin-order-row-main {
  align-items: stretch;
  padding: 16px 18px;
}

.admin-order-row-section {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.admin-order-row-section + .admin-order-row-section {
  padding-left: 16px;
  border-left: 1px solid #e7eef7;
}

.admin-order-row-section-side {
  align-content: space-between;
}

.admin-order-section-label {
  display: block;
  color: #6b7c93;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.admin-order-product-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text);
}

.admin-order-product-sub {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.admin-order-meta-line {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.admin-order-meta-key {
  color: #7c8da3;
  font-size: 12px;
  line-height: 1.6;
}

.admin-order-meta-value {
  color: #314357;
  font-size: 12px;
  line-height: 1.6;
  word-break: break-word;
}

.admin-order-code-value {
  font-family: Consolas, "Courier New", monospace;
}

.admin-order-price-value {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: #d14343;
}

.admin-order-side-tip {
  color: #607389;
  font-size: 12px;
  line-height: 1.7;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f5f8fd;
  border: 1px solid #e5edf6;
}

.admin-order-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 2px;
}

.admin-order-card-actions .text-link-button {
  min-height: 32px;
}

.product-flow-result {
  border-radius: 18px;
  padding: 18px 20px;
  border: 1px solid #dbe5f0;
  background: #f8fbff;
}

.product-flow-result-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.product-flow-result-body {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.product-flow-result.tone-success {
  border-color: #cce9dd;
  background: #f0fbf5;
}

.product-flow-result.tone-warning {
  border-color: #f4ddab;
  background: #fff8ea;
}

.cell-muted {
  color: var(--muted-soft);
}

.cell-code-inline {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 5px 10px;
  border-radius: 10px;
  background: #eff4fa;
  color: #274263;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-item {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 600;
}

.color-chip {
  display: inline-flex;
  max-width: 100%;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.color-chip-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.06);
}

.table-link {
  display: inline-block;
  max-width: 100%;
  color: var(--brand-strong);
  text-decoration: none;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.table-link:hover {
  text-decoration: underline;
}

@media (max-width: 1100px) {
  .admin-order-table-head {
    display: none;
  }

  .admin-order-card-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-order-row-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-order-row-section:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 1180px) {
  .auth-card {
    grid-template-columns: 1fr;
  }

  .auth-brand,
  .auth-meta-panel {
    grid-column: auto;
    grid-row: auto;
  }

  .auth-card::before {
    inset: 0;
  }

  .sidebar {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .brand,
  .sidebar-card {
    margin-left: 0;
  }

  .nav-list {
    justify-content: flex-start;
  }

  .sidebar-card {
    justify-content: space-between;
  }
}

@media (max-width: 900px) {
  .console-shell {
    width: min(100%, calc(100% - 20px));
    padding-top: 10px;
  }

  .content-shell {
    padding-top: 16px;
  }

  .content-header,
  .card,
  .auth-meta-panel,
  .auth-brand {
    padding: 20px;
  }

  .page-grid,
  .admin-workbench-hero,
  .grid-form,
  .grid-form.compact,
  .form-section-grid,
  .summary-grid,
  .info-grid,
  .action-entry-grid,
  .mail-template-preview-grid {
    grid-template-columns: 1fr;
  }

  #adminBoundAccountSummary,
  #adminMyOverviewGrid,
  .admin-my-quick-grid {
    grid-template-columns: 1fr;
  }

  .form-section-grid.price-inline-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #adminOrderTabNav {
    flex-wrap: wrap;
  }

  .form-section-grid.inline-fields,
  .grid-form.compact.inline-fields {
    flex-wrap: wrap;
  }

  .form-section-grid.inline-fields > label,
  .inline-field,
  .grid-form.compact.inline-fields > label,
  .grid-form.compact.inline-fields > .inline-field {
    flex: 1 1 100%;
  }

  .content-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-heading-with-actions,
  .modal-header,
  .modal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .section-heading-tools,
  .packages-heading-tools,
  .packages-heading-filter {
    width: 100%;
  }

  .packages-heading-filter .inline-field.field-medium,
  .packages-heading-filter .inline-field.field-wide {
    width: 100%;
  }

  .mail-setting-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .filter-inline-form {
    grid-template-columns: 1fr;
  }

  .asset-field-grid {
    grid-template-columns: 1fr;
  }

  .package-editor-actions {
    flex-direction: column;
  }

  .package-editor-actions a,
  .package-editor-actions button {
    width: 100%;
  }

  .filter-actions {
    justify-content: flex-start;
  }

  .admin-order-row-main {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .admin-order-row-section + .admin-order-row-section {
    padding-left: 0;
    padding-top: 14px;
    border-left: 0;
    border-top: 1px solid #e7eef7;
  }

  .package-table,
  .package-table thead,
  .package-table tbody,
  .package-table tr,
  .package-table th,
  .package-table td {
    display: block;
    width: 100%;
  }

  .package-table thead {
    display: none;
  }

  .package-table tbody tr {
    padding: 12px 14px;
    border-bottom: 1px solid #edf2f7;
  }

  .package-table tbody tr:last-child {
    border-bottom: none;
  }

  .package-table td {
    padding: 6px 0;
    border-bottom: none;
  }

  .package-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 12px;
  }

  .user-management-table,
  .user-management-table thead,
  .user-management-table tbody,
  .user-management-table tr,
  .user-management-table th,
  .user-management-table td {
    display: block;
    width: 100%;
  }

  .user-management-table thead {
    display: none;
  }

  .user-management-table tbody tr {
    padding: 12px 14px;
    border-bottom: 1px solid #edf2f7;
  }

  .user-management-table tbody tr:last-child {
    border-bottom: none;
  }

  .user-management-table td {
    padding: 6px 0;
    border-bottom: none;
  }

  .user-management-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 12px;
  }

  .mail-settings-actions {
    padding-left: 0;
    flex-direction: column;
  }

  .sidebar-card {
    width: 100%;
    flex-wrap: wrap;
    border-radius: 18px;
  }

  .modal-backdrop {
    padding: 16px;
  }

  .modal-card {
    padding: 18px;
  }

  .table-actions button,
  .modal-actions button {
    width: 100%;
  }

  .product-detail-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .auth-shell {
    padding: 18px;
  }

  .auth-card {
    min-height: auto;
    border-radius: 24px;
  }

  .auth-brand h1 {
    font-size: 32px;
  }

  .sidebar {
    padding: 14px;
    border-radius: 20px;
  }

  .nav-list {
    gap: 8px;
  }

  .nav-link {
    min-height: 38px;
    padding: 0 13px;
    font-size: 13px;
  }
}
