:root {
  --color-primary: #0369a1;
  --color-primary-light: #0ea5e9;
  --color-surface: #ffffff;
  --color-bg: #f1f5f9;
  --color-border: #e2e8f0;
  --color-text: #0f172a;
  --color-muted: #64748b;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-card: 0 1px 3px rgb(15 23 42 / 8%), 0 4px 16px rgb(15 23 42 / 5%);
  --nav-width: 220px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
}

body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
}

body.hdd-login-body {
  overflow: auto;
}

a { color: inherit; }

.hdd-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.hdd-nav {
  width: var(--nav-width);
  flex-shrink: 0;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  overflow-y: auto;
  z-index: 100;
}

.hdd-nav-brand {
  padding: 20px 16px;
  border-bottom: 1px solid #334155;
}

.hdd-brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.hdd-brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
}

.hdd-brand-link strong {
  display: block;
  color: #38bdf8;
  font-size: 1.05rem;
}

.hdd-brand-text { min-width: 0; }

.hdd-brand-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hdd-nav-tagline {
  display: block;
  color: #94a3b8;
  font-size: 11px;
  margin-top: 6px;
  line-height: 1.4;
}

.hdd-nav-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #166534;
  background: #14532d;
  color: #bbf7d0;
  font-size: 10px;
  font-weight: 600;
}

.hdd-brand-mark-lg {
  width: 52px;
  height: 52px;
  font-size: 1.35rem;
  margin-bottom: 16px;
}

.hdd-nav-links {
  flex: 1;
  padding: 8px 12px 16px;
}

.hdd-nav-section {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  padding: 16px 12px 6px;
}

.hdd-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: #cbd5e1;
  text-decoration: none;
  border-radius: var(--radius-md);
  margin-bottom: 4px;
  font-size: 14px;
}

.hdd-nav-link i {
  font-size: 1.05rem;
  opacity: 0.9;
  flex-shrink: 0;
}

.hdd-nav-link span { flex: 1; }

.hdd-nav-link:hover {
  background: #334155;
  color: #fff;
}

.hdd-nav-link.active {
  background: #334155;
  color: #fff;
  border-left: 3px solid var(--color-primary-light);
  padding-left: 9px;
}

.hdd-nav-product {
  margin-bottom: 6px;
  border-radius: var(--radius-md);
  background: rgb(15 23 42 / 35%);
}

.hdd-nav-product-summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  user-select: none;
}

.hdd-nav-product-summary::-webkit-details-marker {
  display: none;
}

.hdd-nav-product-summary:hover {
  background: rgb(51 65 85 / 45%);
  border-radius: var(--radius-md);
}

.hdd-nav-product-name {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
  flex: 1;
  min-width: 0;
}

.hdd-nav-product-id {
  font-size: 10px;
  color: #64748b;
  background: transparent;
  padding: 0;
}

.hdd-nav-chevron {
  font-size: 0.95rem;
  color: #94a3b8;
  transition: transform 0.15s ease;
  margin-left: auto;
}

.hdd-nav-product[open] .hdd-nav-chevron {
  transform: rotate(180deg);
}

.hdd-nav-subgroup {
  margin: 0 6px 8px;
  padding: 4px 0 4px 8px;
  border-left: 2px solid #334155;
}

.hdd-nav-subgroup .hdd-nav-link {
  padding: 7px 12px 7px 10px;
  font-size: 13px;
  color: #94a3b8;
}

.hdd-nav-subgroup .hdd-nav-link i {
  font-size: 0.95rem;
}

.hdd-nav-subgroup .hdd-nav-link.active {
  color: #e2e8f0;
  border-left: 2px solid #38bdf8;
  padding-left: 8px;
}

.hdd-nav-footer {
  padding: 12px 16px 16px;
  border-top: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hdd-nav-user {
  font-size: 13px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hdd-main {
  flex: 1;
  margin-left: var(--nav-width);
  height: 100vh;
  overflow-y: auto;
  padding: 28px 36px 40px;
  width: calc(100% - var(--nav-width));
  max-width: 100%;
}

.hdd-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-primary);
  text-decoration: none;
  margin-bottom: 10px;
}

.hdd-back-link:hover {
  text-decoration: underline;
}

.hdd-page-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 20px;
}

.hdd-page-header-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.hdd-admin-toolbar {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 16px;
	width: 100%;
}

.hdd-admin-toolbar-main {
	display: flex;
	flex: 1;
	min-width: 0;
	align-items: center;
	gap: 8px;
	flex-wrap: nowrap;
}

.hdd-admin-toolbar-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.hdd-search-input {
	flex: 1;
	min-width: 0;
}

.hdd-status-select {
	width: 132px;
	flex-shrink: 0;
}

.hdd-empty-cell {
	text-align: center;
	padding: 28px 16px !important;
}

.hdd-dialog-wide {
	max-width: min(640px, 96vw);
}

.hdd-dialog-footer {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 8px;
}

.hdd-dialog {
	border: none;
	border-radius: var(--radius-lg);
	padding: 0;
	max-width: min(520px, 96vw);
	box-shadow: 0 24px 48px rgb(15 23 42 / 18%);
}

.hdd-dialog::backdrop {
	background: rgb(15 23 42 / 45%);
}

.hdd-dialog-panel {
	padding: 20px 24px 16px;
}

.hdd-dialog-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}

.hdd-dialog-header h3 {
	margin: 0;
	font-size: 1.1rem;
}

.hdd-dialog-close {
	border: none;
	background: transparent;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	color: var(--color-muted);
	padding: 0 4px;
}

.hdd-dialog-close:hover {
	color: var(--color-text);
}

.hdd-page-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hdd-page-subtitle {
  margin: 6px 0 0;
  color: var(--color-muted);
  font-size: 14px;
}

.hdd-flash {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 14px;
}

.hdd-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
  overflow: hidden;
}

.hdd-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hdd-card-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.hdd-card-body {
  padding: 20px;
}

.hdd-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.hdd-kpi-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hdd-kpi-value-money {
  font-size: 1.65rem;
  letter-spacing: -0.02em;
}

.hdd-kpi-label i {
  margin-right: 4px;
  opacity: 0.75;
}

.hdd-money-cell {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #0369a1;
}

.hdd-section-head {
  margin: 28px 0 14px;
}

.hdd-section-title {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .hdd-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hdd-kpi-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .hdd-nav { position: relative; width: 100%; }
  .hdd-main { margin-left: 0; padding: 16px; }
  .hdd-kpi-grid { grid-template-columns: 1fr; }
}

.hdd-kpi {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
  border-top: 3px solid var(--color-primary);
}

.hdd-kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-muted);
  margin-bottom: 8px;
}

.hdd-kpi-link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}
.hdd-kpi-link:hover { text-decoration: underline; }

.hdd-table-sm td, .hdd-table-sm th { padding: 8px 10px; font-size: 0.88rem; }

.hdd-kpi-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.hdd-grid-2 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

@media (max-width: 960px) {
  .hdd-grid-2 { grid-template-columns: 1fr; }
}

.hdd-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.hdd-field label,
.hdd-field > span {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-muted);
}

.hdd-field input,
.hdd-field select,
.hdd-field textarea,
.hdd-input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 9px 12px;
  font-size: 14px;
  background: #fff;
  color: var(--color-text);
}

.hdd-field input:focus,
.hdd-field select:focus,
.hdd-field textarea:focus {
  outline: none;
  border-color: var(--color-primary-light);
  box-shadow: 0 0 0 3px rgb(14 165 233 / 15%);
}

/* 订单/用户搜索栏：覆盖 .hdd-input 的 width:100%，避免下拉撑满、输入框过窄 */
.hdd-admin-toolbar-main .hdd-search-input {
	flex: 1 1 auto;
	min-width: 240px;
	width: auto;
	max-width: none;
}

.hdd-admin-toolbar-main .hdd-status-select {
	flex: 0 0 100px;
	width: 100px;
	max-width: 100px;
	min-width: 100px;
	padding-left: 8px;
	padding-right: 24px;
}

.hdd-field-hint {
  font-size: 11px;
  color: var(--color-muted);
}

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

.hdd-col-2 { grid-column: span 2; }
.hdd-col-3 { grid-column: span 3; }
.hdd-col-4 { grid-column: span 4; }
.hdd-col-6 { grid-column: span 6; }
.hdd-col-8 { grid-column: span 8; }
.hdd-col-12 { grid-column: span 12; }

@media (max-width: 960px) {
  .hdd-col-2, .hdd-col-3, .hdd-col-4, .hdd-col-6, .hdd-col-8 { grid-column: span 12; }
}

/* —— 产品定价页 —— */
.hdd-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px;
  margin-top: 4px;
}

.hdd-pricing-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.hdd-pricing-card:hover {
  border-color: #7dd3fc;
  box-shadow: 0 8px 24px rgb(14 165 233 / 8%);
}

.hdd-pricing-card-head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--color-border);
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
}

.hdd-pricing-card-title h3 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 700;
}

.hdd-pricing-card-title code {
  font-size: 11px;
  color: var(--color-muted);
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
}

.hdd-pricing-tag-field {
  margin: 0;
  min-width: 140px;
  flex: 1;
  max-width: 200px;
}

.hdd-pricing-tag-field label {
  font-size: 11px;
}

.hdd-pricing-periods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  flex: 1;
}

@media (max-width: 520px) {
  .hdd-pricing-periods { grid-template-columns: 1fr; }
}

.hdd-pricing-period {
  padding: 16px 18px;
  border-bottom: 1px solid var(--color-border);
}

.hdd-pricing-period + .hdd-pricing-period {
  border-left: 1px solid var(--color-border);
}

@media (max-width: 520px) {
  .hdd-pricing-period + .hdd-pricing-period {
    border-left: none;
    border-top: 1px solid var(--color-border);
  }
}

.hdd-pricing-period-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
}

.hdd-pricing-period-title i {
  font-size: 1.1rem;
  opacity: 0.85;
}

.hdd-pricing-fields .hdd-field {
  margin-bottom: 10px;
}

.hdd-pricing-fields .hdd-field:last-of-type {
  margin-bottom: 0;
}

.hdd-cents-hint {
  color: var(--color-primary);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.hdd-pricing-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: #f8fafc;
  border: 1px solid var(--color-border);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.hdd-pricing-toggle input {
  width: auto;
  margin: 0;
  accent-color: var(--color-primary);
}

.hdd-pricing-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: #f8fafc;
  border-top: 1px solid var(--color-border);
}

.hdd-pricing-toggle-main {
  margin: 0;
  flex: 1;
  background: #fff;
}

.hdd-pricing-card-foot .hdd-btn {
  flex-shrink: 0;
}

.hdd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 9px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.hdd-btn:hover { background: #0284c7; }
.hdd-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.hdd-btn-block {
  width: 100%;
  margin-top: 8px;
}

.hdd-btn-secondary {
  background: #e2e8f0;
  color: #334155;
}

.hdd-btn-secondary:hover { background: #cbd5e1; }

.hdd-btn-ghost {
  background: transparent;
  color: #cbd5e1;
  border: 1px solid #475569;
}

.hdd-btn-ghost:hover {
  background: #334155;
  color: #fff;
}

.hdd-btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.hdd-btn-danger {
  background: #fee2e2;
  color: #b91c1c;
}

.hdd-table-wrap { overflow-x: auto; }

.hdd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.hdd-table th,
.hdd-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: middle;
}

.hdd-table th {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-muted);
  background: #f8fafc;
}

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

.hdd-table code {
  font-size: 12px;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
}

.hdd-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.hdd-badge-ok { background: #dcfce7; color: #15803d; }
.hdd-badge-warn { background: #fef9c3; color: #a16207; }
.hdd-badge-muted { background: #f1f5f9; color: #64748b; }
.hdd-badge-blue { background: #dbeafe; color: #1d4ed8; }
.hdd-badge-green { background: #dcfce7; color: #15803d; }
.hdd-badge-purple { background: #ede9fe; color: #6d28d9; }
.hdd-badge-cyan { background: #cffafe; color: #0e7490; }

.hdd-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.hdd-product-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  min-height: 320px;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.hdd-product-card:hover {
  border-color: #7dd3fc;
  box-shadow: 0 10px 28px rgb(14 165 233 / 12%);
}

.hdd-product-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 24px 16px;
}

.hdd-product-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.hdd-product-card-top-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.hdd-product-edit-btn {
  padding: 4px 8px;
  font-size: 12px;
  color: var(--color-muted);
}

.hdd-product-edit-btn:hover {
  color: #0369a1;
  background: #f0f9ff;
}

.hdd-product-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, #e0f2fe, #bae6fd);
  color: #0369a1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
}

.hdd-product-name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
}

.hdd-product-id {
  font-size: 12px;
  color: var(--color-muted);
}

.hdd-product-desc {
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.55;
  min-height: 2.8em;
  margin: 0;
  flex: 1;
}

.hdd-product-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 4px;
}

.hdd-product-kpi {
  padding: 12px 10px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  text-align: center;
}

.hdd-product-kpi-label {
  display: block;
  font-size: 11px;
  color: var(--color-muted);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.hdd-product-kpi-value {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.hdd-product-kpi-money {
  font-size: 1rem;
  color: #0369a1;
}

.hdd-product-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-size: 12px;
  color: var(--color-muted);
  padding-top: 4px;
  border-top: 1px dashed var(--color-border);
}

.hdd-product-meta .ti {
  opacity: 0.75;
}

.hdd-product-meta-link {
  color: #b45309;
  font-weight: 500;
  text-decoration: none;
}

.hdd-product-meta-link:hover {
  text-decoration: underline;
}

.hdd-product-actions {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--color-border);
  background: #f8fafc;
}

.hdd-product-actions .hdd-btn {
  border-radius: 0;
  border: none;
  border-right: 1px solid var(--color-border);
  box-shadow: none;
  justify-content: center;
  padding: 12px 6px;
  font-size: 12px;
  white-space: nowrap;
}

.hdd-product-actions .hdd-btn:last-child {
  border-right: none;
}

.hdd-product-actions .hdd-btn-secondary {
  background: transparent;
}

.hdd-product-actions .hdd-btn-secondary:hover {
  background: #e2e8f0;
}

.hdd-btn-primary-soft {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 600;
}

.hdd-product-actions .hdd-btn-primary-soft:hover {
  background: #bae6fd;
}

@media (max-width: 900px) {
  .hdd-product-grid {
    grid-template-columns: 1fr;
  }

  .hdd-product-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hdd-product-actions .hdd-btn:nth-child(3n) {
    border-right: none;
  }

  .hdd-product-actions .hdd-btn:nth-child(-n + 3) {
    border-bottom: 1px solid var(--color-border);
  }
}

.hdd-alert {
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 14px;
}

.hdd-alert-warn {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.hdd-alert-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.hdd-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  padding: 4px;
  background: #e2e8f0;
  border-radius: var(--radius-lg);
  width: fit-content;
  max-width: 100%;
}

.hdd-filter-tab {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.hdd-filter-tab:hover {
  color: var(--color-text);
  background: rgb(255 255 255 / 60%);
}

.hdd-filter-tab.active {
  background: var(--color-surface);
  color: var(--color-primary);
  box-shadow: var(--shadow-card);
}

.hdd-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--color-bg);
}

.hdd-login-shell {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(340px, 420px);
  width: 100%;
  max-width: 920px;
  min-height: 520px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card), 0 24px 48px rgb(15 23 42 / 12%);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.hdd-login-panel-brand {
  background: linear-gradient(160deg, #0c4a6e 0%, #0f172a 55%, #1e293b 100%);
  color: #e2e8f0;
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hdd-login-brand-inner h1 {
  margin: 0 0 8px;
  font-size: 1.65rem;
  color: #38bdf8;
  letter-spacing: -0.02em;
}

.hdd-login-tagline {
  margin: 0 0 24px;
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.5;
}

.hdd-login-features {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  color: #cbd5e1;
  line-height: 1.8;
}

.hdd-login-panel-form {
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hdd-login-form-header h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 700;
}

.hdd-login-form-header p {
  margin: 0 0 20px;
  color: var(--color-muted);
  font-size: 14px;
}

.hdd-login-form .hdd-field:last-of-type {
  margin-bottom: 4px;
}

@media (max-width: 768px) {
  .hdd-login-shell {
    grid-template-columns: 1fr;
    max-width: 420px;
    min-height: auto;
  }
  .hdd-login-panel-brand {
    padding: 28px 24px;
  }
  .hdd-login-features { display: none; }
  .hdd-login-panel-form { padding: 24px; }
}

.hdd-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--color-text);
}

.hdd-check-row input { width: auto; margin: 0; }

.plan-matrix td { min-width: 8rem; }
.plan-matrix td:first-child { min-width: 14rem; }
.plan-matrix-group-row td {
  background: #f8fafc;
  border-top: 1px solid var(--color-border);
  padding: 10px 12px;
}
.plan-matrix-group + .plan-matrix-group .plan-matrix-group-row td {
  border-top-width: 2px;
}
.plan-matrix .plan-cell { text-align: center; vertical-align: middle; }
.plan-cell-form { margin: 0; display: flex; justify-content: center; }
.plan-cell-form .hdd-input { width: auto; max-width: 100%; }
.control-meta { font-size: 12px; color: var(--color-muted); }

.hdd-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--color-muted);
  font-size: 14px;
}

.hdd-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hdd-muted { color: var(--color-muted); font-size: 13px; }
.hdd-text-sm { font-size: 13px; }
