/* ============================================
   Design Contract — 数码印刷智能生产系统
   Style: business-international (enterprise)
   Stack: vanilla / pure-static
   ============================================ */

/* ---------- Design Tokens ---------- */
:root {
  /* Primary */
  --primary: #1677ff;
  --primary-hover: #4096ff;
  --primary-active: #0958d9;
  --primary-light: #e6f4ff;
  --primary-bg: #f0f7ff;

  /* Status */
  --success: #52c41a;
  --success-bg: #f6ffed;
  --success-border: #b7eb8f;
  --warning: #faad14;
  --warning-bg: #fffbe6;
  --warning-border: #ffe58f;
  --error: #ff4d4f;
  --error-bg: #fff2f0;
  --error-border: #ffccc7;
  --info: #1677ff;
  --info-bg: #e6f4ff;

  /* Neutral */
  --bg-base: #f5f7fa;
  --bg-card: #ffffff;
  --bg-hover: #f5f5f5;
  --bg-layout: #f0f2f5;
  --border: #e8e8e8;
  --border-light: #f0f0f0;
  --border-split: #d9d9d9;

  /* Text */
  --text-primary: #1f1f1f;
  --text-secondary: #595959;
  --text-tertiary: #8c8c8c;
  --text-quaternary: #bfbfbf;
  --text-inverse: #ffffff;

  /* Sidebar */
  --sidebar-bg: #001529;
  --sidebar-hover: #1f2d3d;
  --sidebar-active: #1677ff;
  --sidebar-text: #ffffffcc;
  --sidebar-text-active: #ffffff;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);

  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 12px;
  --spacing-lg: 16px;
  --spacing-xl: 24px;
  --spacing-2xl: 32px;

  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --font-mono: "SF Mono", "Fira Code", Consolas, monospace;
  --font-size-xs: 12px;
  --font-size-sm: 13px;
  --font-size-base: 14px;
  --font-size-md: 15px;
  --font-size-lg: 16px;
  --font-size-xl: 18px;
  --font-size-2xl: 20px;
  --font-size-3xl: 24px;
  --font-size-4xl: 30px;

  /* Demo-extended palette */
  --brand: #1e3a5f;
  --red: #c8102e;
  --green-d: #16a34a;
  --orange-d: #ea580c;
  --line: #e3e8ef;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Layout */
  --sidebar-width: 240px;
  --sidebar-collapsed-width: 64px;
  --topbar-height: 56px;
  --content-max-width: 100%;
}

/* ---------- Reset ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--font-size-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--text-primary);
  background: var(--bg-layout);
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-hover);
}

ul, ol {
  list-style: none;
}

/* ---------- App Shell ---------- */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1000;
  transition: width 0.3s cubic-bezier(0.2, 0, 0, 1);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-header {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  padding: 0 var(--spacing-lg);
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: #fff;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-logo .logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), #0958d9);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
  color: #fff;
}

.sidebar-logo .logo-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-nav {
  flex: 1;
  padding: var(--spacing-sm) 0;
}

.sidebar-group {
  margin-bottom: var(--spacing-xs);
}

.sidebar-group-title {
  padding: var(--spacing-sm) var(--spacing-xl) var(--spacing-xs);
  font-size: var(--font-size-xs);
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-item {
  display: flex;
  align-items: center;
  padding: 0 var(--spacing-xl);
  height: 44px;
  color: var(--sidebar-text);
  font-size: var(--font-size-base);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  border-left: 3px solid transparent;
  text-decoration: none;
}

.sidebar-item:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text-active);
}

.sidebar-item.active {
  background: rgba(22, 119, 255, 0.15);
  color: var(--sidebar-text-active);
  border-left-color: var(--sidebar-active);
}

.sidebar-item .nav-icon {
  width: 20px;
  height: 20px;
  margin-right: var(--spacing-md);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.sidebar-item .nav-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main area */
.main-area {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.3s cubic-bezier(0.2, 0, 0, 1);
}

/* Topbar */
.topbar {
  height: var(--topbar-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--spacing-xl);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

.topbar-toggle {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.topbar-toggle:hover {
  background: var(--bg-hover);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: var(--font-size-base);
  color: var(--text-tertiary);
}

.breadcrumb .breadcrumb-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.breadcrumb .breadcrumb-sep {
  color: var(--text-quaternary);
  margin: 0 2px;
}

.breadcrumb .breadcrumb-current {
  color: var(--text-primary);
  font-weight: var(--font-weight-medium);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

.topbar-action {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s;
  position: relative;
  font-size: 18px;
}

.topbar-action:hover {
  background: var(--bg-hover);
}

.topbar-action .badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  background: var(--error);
  color: #fff;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  cursor: pointer;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-md);
  transition: all 0.2s;
}

.topbar-user:hover {
  background: var(--bg-hover);
}

.topbar-user .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #0958d9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.topbar-user .user-name {
  font-size: var(--font-size-base);
  color: var(--text-primary);
  font-weight: var(--font-weight-medium);
}

/* Content */
.content-area {
  flex: 1;
  padding: var(--spacing-xl);
  max-width: 100%;
}

.page-header {
  margin-bottom: var(--spacing-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.page-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
}

.page-subtitle {
  font-size: var(--font-size-base);
  color: var(--text-tertiary);
  margin-top: var(--spacing-xs);
}

/* ---------- Components ---------- */

/* Card */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

section.card {
  margin-bottom: 14px;
}

section.card:last-child {
  margin-bottom: 0;
}

.card-header {
  padding: var(--spacing-lg) var(--spacing-xl);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
}

.card-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
}

.card-body {
  padding: var(--spacing-xl);
}

.card-body-np {
  padding: 0;
}

/* Stat Card */
.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: all 0.3s;
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-icon.orange { background: var(--warning-bg); color: var(--warning); }
.stat-icon.red { background: var(--error-bg); color: var(--error); }
.stat-icon.purple { background: #f9f0ff; color: #722ed1; }
.stat-icon.cyan { background: #e6fffb; color: #13c2c2; }

.stat-content {
  flex: 1;
  min-width: 0;
}

.stat-label {
  font-size: var(--font-size-sm);
  color: var(--text-tertiary);
  margin-bottom: var(--spacing-xs);
}

.stat-value {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-suffix {
  font-size: var(--font-size-base);
  color: var(--text-tertiary);
  font-weight: var(--font-weight-normal);
  margin-left: var(--spacing-xs);
}

.stat-trend {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: var(--font-size-xs);
  margin-top: var(--spacing-xs);
}

.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--error); }

/* Grid */
.grid {
  display: grid;
  gap: var(--spacing-lg);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-1 { flex: 1; }
.gap-xs { gap: var(--spacing-xs); }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }
.gap-xl { gap: var(--spacing-xl); }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  height: 36px;
  padding: 0 var(--spacing-lg);
  border: 1px solid var(--border-split);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  background: var(--bg-card);
  color: var(--text-primary);
  text-decoration: none;
  user-select: none;
}

.btn:hover {
  color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
}

.btn-success {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.btn-success:hover {
  background: #73d13d;
  border-color: #73d13d;
  color: #fff;
}

.btn-danger {
  background: var(--error);
  border-color: var(--error);
  color: #fff;
}

.btn-danger:hover {
  background: #ff7875;
  border-color: #ff7875;
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-link {
  background: transparent;
  border: none;
  color: var(--primary);
  padding: 0;
  height: auto;
  cursor: pointer;
  font-size: inherit;
}

.btn-link:hover {
  color: var(--primary-hover);
}

.btn-sm {
  height: 28px;
  padding: 0 var(--spacing-md);
  font-size: var(--font-size-sm);
}

.btn-lg {
  height: 44px;
  padding: 0 var(--spacing-xl);
  font-size: var(--font-size-md);
}

.btn-block {
  width: 100%;
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Input */
.input-group {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.input {
  height: 36px;
  padding: 0 var(--spacing-md);
  border: 1px solid var(--border-split);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  color: var(--text-primary);
  background: var(--bg-card);
  transition: all 0.2s;
  width: 100%;
  outline: none;
}

.input:hover {
  border-color: var(--primary-hover);
}

.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(22,119,255,0.12);
}

.input::placeholder {
  color: var(--text-quaternary);
}

.input-sm {
  height: 28px;
  padding: 0 var(--spacing-sm);
  font-size: var(--font-size-sm);
}

textarea.input {
  height: auto;
  padding: var(--spacing-sm) var(--spacing-md);
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

select.input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%238c8c8c' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* Form */
.form-item {
  margin-bottom: var(--spacing-lg);
}

.form-label {
  display: block;
  font-size: var(--font-size-base);
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
  font-weight: var(--font-weight-medium);
}

.form-label .required {
  color: var(--error);
  margin-left: 2px;
}

.form-hint {
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
  margin-top: var(--spacing-xs);
}

.form-error {
  font-size: var(--font-size-xs);
  color: var(--error);
  margin-top: var(--spacing-xs);
}

.form-row {
  display: flex;
  gap: var(--spacing-lg);
}

.form-row .form-item {
  flex: 1;
}

/* Table */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-base);
}

.table th {
  background: var(--bg-base);
  color: var(--text-secondary);
  font-weight: var(--font-weight-medium);
  text-align: left;
  padding: var(--spacing-md) var(--spacing-md);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-size: var(--font-size-sm);
}

.table td {
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  vertical-align: middle;
}

.table tbody tr {
  transition: background 0.2s;
}

.table tbody tr:hover {
  background: var(--bg-hover);
}

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

/* Tag / Badge */
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: 2px var(--spacing-sm);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  line-height: 20px;
  border: 1px solid;
  white-space: nowrap;
}

.tag-blue { color: var(--primary); background: var(--primary-light); border-color: #91caff; }
.tag-green { color: var(--success); background: var(--success-bg); border-color: var(--success-border); }
.tag-orange { color: var(--warning); background: var(--warning-bg); border-color: var(--warning-border); }
.tag-red { color: var(--error); background: var(--error-bg); border-color: var(--error-border); }
.tag-default { color: var(--text-secondary); background: var(--bg-base); border-color: var(--border-split); }
.tag-purple { color: #722ed1; background: #f9f0ff; border-color: #d3adf7; }
.tag-cyan { color: #13c2c2; background: #e6fffb; border-color: #87e8de; }

/* Status dot */
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: var(--spacing-xs);
  flex-shrink: 0;
}

.status-dot.running { background: var(--success); }
.status-dot.idle { background: var(--text-quaternary); }
.status-dot.error { background: var(--error); }
.status-dot.warning { background: var(--warning); }

/* Tabs */
.tabs {
  display: flex;
  gap: var(--spacing-xs);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--spacing-lg);
}

.tab-item {
  padding: var(--spacing-sm) var(--spacing-lg);
  cursor: pointer;
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}

.tab-item:hover {
  color: var(--primary);
}

.tab-item.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: var(--font-weight-medium);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: var(--spacing-xl);
}

.modal-overlay.show {
  display: flex;
  animation: fadeIn 0.2s;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s;
}

.modal.modal-lg { max-width: 720px; }
.modal.modal-xl { max-width: 960px; }

.modal-header {
  padding: var(--spacing-lg) var(--spacing-xl);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
}

.modal-close {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-size: 18px;
}

.modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.modal-body {
  padding: var(--spacing-xl);
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: var(--spacing-lg) var(--spacing-xl);
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-sm);
}

/* Steps / Wizard */
.steps {
  display: flex;
  align-items: center;
  margin-bottom: var(--spacing-2xl);
  padding: var(--spacing-lg) 0;
}

.step {
  display: flex;
  align-items: center;
  flex: 1;
  position: relative;
}

.step:not(:last-child)::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-split);
  margin: 0 var(--spacing-md);
}

.step.completed:not(:last-child)::after {
  background: var(--success);
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  background: var(--bg-base);
  color: var(--text-tertiary);
  border: 2px solid var(--border-split);
  flex-shrink: 0;
  transition: all 0.3s;
}

.step.active .step-circle {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.step.completed .step-circle {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

.step-label {
  margin-left: var(--spacing-sm);
  font-size: var(--font-size-base);
  color: var(--text-tertiary);
  white-space: nowrap;
}

.step.active .step-label {
  color: var(--text-primary);
  font-weight: var(--font-weight-medium);
}

.step.completed .step-label {
  color: var(--success);
}

/* Progress */
.progress {
  height: 8px;
  background: var(--bg-base);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-sm);
  transition: width 0.5s ease;
}

.progress-bar.success { background: var(--success); }
.progress-bar.warning { background: var(--warning); }
.progress-bar.error { background: var(--error); }

/* Empty state */
.empty {
  text-align: center;
  padding: var(--spacing-2xl) var(--spacing-lg);
  color: var(--text-tertiary);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: var(--spacing-md);
  opacity: 0.4;
}

.empty-text {
  font-size: var(--font-size-base);
}

/* Loading */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-2xl);
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border-split);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-text {
  margin-left: var(--spacing-sm);
  color: var(--text-tertiary);
  font-size: var(--font-size-sm);
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-base) 25%, var(--bg-hover) 50%, var(--bg-base) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* Alert */
.alert {
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius-md);
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  font-size: var(--font-size-base);
  margin-bottom: var(--spacing-md);
  border: 1px solid;
}

.alert-info { background: var(--info-bg); border-color: #91caff; color: var(--text-primary); }
.alert-success { background: var(--success-bg); border-color: var(--success-border); color: var(--text-primary); }
.alert-warning { background: var(--warning-bg); border-color: var(--warning-border); color: var(--text-primary); }
.alert-error { background: var(--error-bg); border-color: var(--error-border); color: var(--text-primary); }

.alert-icon { flex-shrink: 0; font-size: 16px; margin-top: 2px; }

/* Tooltip */
[data-tooltip] {
  position: relative;
  cursor: help;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  margin-bottom: 4px;
  z-index: 999;
}

[data-tooltip]:hover::after {
  opacity: 1;
}

/* Divider */
.divider {
  height: 1px;
  background: var(--border-light);
  margin: var(--spacing-lg) 0;
}

.divider-vertical {
  width: 1px;
  background: var(--border-light);
  align-self: stretch;
  margin: 0 var(--spacing-lg);
}

/* Search bar */
.search-bar {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  flex: 1;
  max-width: 400px;
}

.search-bar .input {
  flex: 1;
  padding-left: 32px;
  position: relative;
}

.search-wrap {
  position: relative;
  flex: 1;
}

.search-wrap .input {
  padding-left: 36px;
  width: 100%;
}

.search-wrap .search-icon {
  position: absolute;
  left: var(--spacing-md);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-quaternary);
  font-size: 16px;
  pointer-events: none;
}

/* Filter bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
  margin-bottom: var(--spacing-lg);
}

.filter-bar .input,
.filter-bar select.input {
  width: auto;
  min-width: 160px;
}

.filter-bar .search-wrap {
  min-width: 240px;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--spacing-xs);
  padding: var(--spacing-md) 0;
}

.pagination-info {
  font-size: var(--font-size-sm);
  color: var(--text-tertiary);
  margin-right: var(--spacing-md);
}

.pagination .btn {
  min-width: 32px;
  padding: 0 var(--spacing-sm);
}

.pagination .btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Chart placeholders */
.chart-container {
  width: 100%;
  height: 300px;
  position: relative;
}

.chart-bar {
  display: flex;
  align-items: flex-end;
  gap: var(--spacing-md);
  height: 240px;
  padding: var(--spacing-md) 0;
}

.chart-bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xs);
}

.chart-bar-fill {
  width: 60%;
  background: linear-gradient(180deg, var(--primary), var(--primary-hover));
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: height 0.5s ease;
  min-height: 4px;
}

.chart-bar-label {
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: var(--spacing-xl);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border-split);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--spacing-lg);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg-card);
  box-shadow: 0 0 0 1px var(--border);
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-time {
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
  margin-bottom: var(--spacing-xs);
}

.timeline-content {
  font-size: var(--font-size-base);
  color: var(--text-primary);
}

/* Production screen */
.production-screen {
  background: #0a1929;
  min-height: 100vh;
  color: #fff;
  padding: var(--spacing-lg);
}

.production-screen .screen-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-md);
}

@media (max-width: 1200px) {
  .production-screen .screen-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.screen-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
}

.screen-card-title {
  font-size: var(--font-size-sm);
  color: rgba(255,255,255,0.6);
  margin-bottom: var(--spacing-sm);
}

.screen-card-value {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: #00d4ff;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Responsive */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .main-area {
    margin-left: 0;
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.45);
    z-index: 999;
  }

  .sidebar-overlay.show {
    display: block;
  }
}

@media (max-width: 768px) {
  .content-area {
    padding: var(--spacing-md);
  }

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

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-bar .input,
  .filter-bar select.input,
  .filter-bar .search-wrap {
    width: 100%;
    min-width: 0;
  }

  .form-row {
    flex-direction: column;
  }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  .demo-form-grid {
    grid-template-columns: 1fr !important;
  }

  .demo-stats {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ================================================
   Demo-Extended Component Styles
   (from demo_html_1.html — used by all new pages)
   ================================================ */

/* ---------- Sidebar Phase/Module (collapsible) ---------- */
.sidebar-phase {
  margin: 12px 12px 6px;
  font-size: 11px;
  color: #8394ab;
  letter-spacing: .6px;
  padding: 6px 9px;
  background: rgba(255,255,255,.045);
  border-radius: 4px;
}

.sidebar-mod { margin-bottom: 2px; }

.sidebar-mod-hd {
  padding: 8px 16px;
  font-size: 12.5px;
  color: #e2e9f2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.sidebar-mod-hd:hover { background: rgba(255,255,255,.05); }

.sidebar-arrow {
  font-size: 9px;
  color: #7d8da5;
  transition: .2s;
}

.sidebar-mod.collapsed .sidebar-arrow { transform: rotate(-90deg); }
.sidebar-mod.collapsed .sidebar-items { display: none; }

.sidebar-items { overflow: hidden; }

.sidebar-nav-item {
  display: block;
  padding: 7px 16px 7px 28px;
  font-size: 12.5px;
  cursor: pointer;
  color: #a9b6c8;
  border-left: 2px solid transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  transition: all .15s;
}

.sidebar-nav-item:hover {
  background: rgba(255,255,255,.06);
  color: #fff;
}

.sidebar-nav-item.active {
  background: rgba(22,119,255,.25);
  color: #fff;
  border-left-color: var(--primary);
}

/* ---------- Demo Card ---------- */
.card-hd {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fbfcfe;
}

.card-hd h3 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.card-hd h3::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 12px;
  background: var(--primary);
  margin-right: 8px;
  border-radius: 2px;
}

.card-extra {
  font-size: 12px;
  color: var(--text-tertiary);
  display: flex;
  gap: 8px;
  align-items: center;
}

.card-bd { padding: 14px; }
.card-bd.nopad { padding: 0; }

/* ---------- Demo Table ---------- */
.tbl-wrap { overflow-x: auto; }

table.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.tbl th {
  background: #f7f9fc;
  color: #4b5563;
  font-weight: 600;
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.tbl td {
  padding: 9px 12px;
  border-bottom: 1px solid #eef1f6;
  color: #374151;
  white-space: nowrap;
}

.tbl tbody tr:hover { background: #f8fbff; }
.tbl tbody tr:last-child td { border-bottom: none; }

/* ---------- Demo Buttons ---------- */
.demo-btn, .card-bd .btn, .toolbar .btn {
  border: 1px solid #d3dae4;
  background: #fff;
  color: #374151;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 12.5px;
  cursor: pointer;
  transition: .15s;
  font-family: inherit;
  display: inline-block;
  text-decoration: none;
  line-height: 1.5;
  height: auto;
}

.demo-btn:hover, .card-bd .btn:hover, .toolbar .btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.demo-btn.primary, .card-bd .btn.primary, .card-bd .btn.btn-primary, .toolbar .btn.primary, .toolbar .btn.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.demo-btn.primary:hover, .card-bd .btn.primary:hover, .card-bd .btn.btn-primary:hover, .toolbar .btn.primary:hover, .toolbar .btn.btn-primary:hover {
  background: var(--primary-active);
  color: #fff;
}

.demo-btn.danger, .card-bd .btn.danger, .toolbar .btn.danger {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.demo-btn.danger:hover, .card-bd .btn.danger:hover, .toolbar .btn.danger:hover {
  background: #a50d26;
  color: #fff;
}

.demo-btn.sm, .card-bd .btn.sm, .toolbar .btn.sm {
  padding: 3px 9px;
  font-size: 12px;
}

/* ---------- Demo Toolbar ---------- */
.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 12px;
}

.toolbar.mt { margin-top: 14px; }

/* ---------- Demo Filters ---------- */
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  padding: 11px 14px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.filters label {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ---------- Demo Form Grid ---------- */
.demo-form-grid, .card-bd .form-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px 16px;
}

.fi {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.fi label {
  font-size: 12px;
  color: var(--text-tertiary);
}

.fi.s2 { grid-column: span 2; }
.fi.s3 { grid-column: span 3; }
.fi.s4 { grid-column: span 4; }

/* ---------- Demo Input ---------- */
.inp {
  border: 1px solid #d3dae4;
  border-radius: 4px;
  padding: 6px 9px;
  font-size: 12.5px;
  width: 100%;
  outline: none;
  background: #fff;
  font-family: inherit;
  color: #374151;
  box-sizing: border-box;
}

.inp:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(22,119,255,.1);
}

.inp[readonly] {
  background: #f7f9fc;
  color: #6b7280;
}

/* ---------- Demo Stats ---------- */
.demo-stats, .card-bd .stats, .stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.demo-stats .stat, .card-bd .stat, .stats .stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 13px 15px;
}

.demo-stats .stat-l, .card-bd .stat .stat-l, .stats .stat .stat-l {
  font-size: 12px;
  color: var(--text-tertiary);
}

.demo-stats .stat-v, .card-bd .stat .stat-v, .stats .stat .stat-v {
  font-size: 22px;
  font-weight: 700;
  margin-top: 6px;
  color: var(--brand);
  line-height: 1.1;
}

.demo-stats .stat-v.blue, .card-bd .stat .stat-v.blue, .stats .stat .stat-v.blue { color: var(--primary); }
.demo-stats .stat-v.green, .card-bd .stat .stat-v.green, .stats .stat .stat-v.green { color: var(--green-d); }
.demo-stats .stat-v.orange, .card-bd .stat .stat-v.orange, .stats .stat .stat-v.orange { color: var(--orange-d); }
.demo-stats .stat-v.red, .card-bd .stat .stat-v.red, .stats .stat .stat-v.red { color: var(--red); }

.demo-stats .stat-s, .card-bd .stat .stat-s, .stats .stat .stat-s {
  font-size: 11.5px;
  color: #9aa4b2;
  margin-top: 5px;
}

/* ---------- Demo Badge ---------- */
.demo-badge, .card-bd .badge, .badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 9px;
  font-size: 11.5px;
  line-height: 17px;
  white-space: nowrap;
}

.demo-badge.gray, .card-bd .badge.gray, .badge.gray { background: #eef1f5; color: #5b6472; }
.demo-badge.green, .card-bd .badge.green, .badge.green { background: #e6f7ee; color: #128a4a; }
.demo-badge.blue, .card-bd .badge.blue, .badge.blue { background: #e7f0ff; color: #2563eb; }
.demo-badge.orange, .card-bd .badge.orange, .badge.orange { background: #fff2e3; color: #c05a00; }
.demo-badge.red, .card-bd .badge.red, .badge.red { background: #fdecec; color: #c8102e; }
.demo-badge.purple, .card-bd .badge.purple, .badge.purple { background: #f0eaff; color: #6d3bd8; }

/* ---------- Demo Ops ---------- */
.ops .op {
  color: var(--primary);
  margin-right: 9px;
  font-size: 12.5px;
  cursor: pointer;
  text-decoration: none;
}

.ops .op:hover { text-decoration: underline; }
.ops .op.del { color: var(--red); }

/* ---------- Demo Dropzone ---------- */
.dropzone {
  border: 1.5px dashed #c4cfdd;
  border-radius: 6px;
  padding: 26px;
  text-align: center;
  color: var(--text-tertiary);
  background: #fbfcfe;
  font-size: 12.5px;
}

.dropzone .big {
  font-size: 26px;
  display: block;
  margin-bottom: 8px;
  opacity: .7;
}

.dropzone b { color: var(--primary); }

/* ---------- Demo Mini Bar ---------- */
.demo-bar, .card-bd .bar, .bar {
  display: inline-block;
  width: 78px;
  height: 6px;
  background: #eef1f6;
  border-radius: 3px;
  overflow: hidden;
  vertical-align: middle;
  margin-right: 6px;
}

.demo-bar i, .card-bd .bar i, .bar i {
  display: block;
  height: 100%;
  border-radius: 3px;
}

/* ---------- Demo Steps ---------- */
.demo-steps, .card-bd .steps, .steps {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.demo-steps .step, .card-bd .step, .steps .step {
  flex: 1;
  min-width: 180px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
  background: #fbfcfe;
}

.demo-steps .step .n, .card-bd .step .n, .steps .step .n {
  font-size: 11px;
  color: #fff;
  background: var(--brand);
  display: inline-block;
  padding: 1px 8px;
  border-radius: 9px;
}

.demo-steps .step h4, .card-bd .step h4, .steps .step h4 {
  margin: 8px 0 6px;
  font-size: 13px;
}

.demo-steps .step p, .card-bd .step p, .steps .step p {
  margin: 0;
  color: var(--text-tertiary);
  font-size: 12px;
  line-height: 1.6;
}

/* ---------- Demo Flow ---------- */
.demo-flow, .card-bd .flow, .flow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.demo-flow .node, .card-bd .flow .node, .flow .node {
  background: #eaf1fd;
  border: 1px solid #c8dbfb;
  color: var(--brand);
  padding: 7px 12px;
  border-radius: 5px;
  font-size: 12.5px;
}

.demo-flow .arw, .card-bd .flow .arw, .flow .arw {
  color: #a9b6c8;
}

/* ---------- Demo Bigscreen ---------- */
.bigscreen {
  background: radial-gradient(circle at 50% 0%, #122b4d, #081120 70%);
  border-radius: 8px;
  padding: 16px;
  color: #cfe0ff;
  margin-bottom: 14px;
  border: 1px solid #1b3355;
}

.bs-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #e8f1ff;
  text-align: center;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(90,140,210,.25);
  margin-bottom: 14px;
}

.bs-title span {
  float: right;
  font-size: 12px;
  font-weight: 400;
  color: #7fa4d8;
  letter-spacing: 0;
}

.bs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.bs-card {
  background: linear-gradient(180deg, #12233d, #0d1a2e);
  border: 1px solid #1e3350;
  border-radius: 6px;
  padding: 13px;
}

.bs-card .l { font-size: 12px; color: #7fa4d8; }
.bs-card .v { font-size: 24px; font-weight: 700; color: #4da3ff; margin-top: 6px; }
.bs-card .v.g { color: #25d07a; }
.bs-card .v.o { color: #ffa940; }
.bs-card .v.r { color: #ff5c72; }

.bs-list {
  margin-top: 14px;
  border-top: 1px solid rgba(90,140,210,.2);
  padding-top: 10px;
}

.bs-row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  padding: 5px 0;
  color: #9dbbe4;
}

.bs-row b { color: #e8f1ff; font-weight: 500; }

/* ---------- Demo Preview ---------- */
.preview-box {
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 6px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9aa4b2;
  font-size: 13px;
  flex-direction: column;
  gap: 8px;
}

.thumb {
  width: 100%;
  height: 90px;
  background: linear-gradient(135deg, #dfe8f5, #eef3fa);
  border: 1px solid var(--line);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8798ad;
  font-size: 12px;
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

/* ---------- Demo Matrix Table ---------- */
.matrix th:first-child,
.matrix td:first-child {
  background: #fbfcfe;
  font-weight: 600;
  color: #4b5563;
}

/* ---------- Demo Switch ---------- */
.switch {
  display: inline-block;
  width: 34px;
  height: 18px;
  border-radius: 9px;
  background: #d3dae4;
  position: relative;
  cursor: pointer;
  vertical-align: middle;
}

.switch::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  top: 2px;
  left: 2px;
  transition: .2s;
}

.switch.on { background: var(--primary); }
.switch.on::after { left: 18px; }

/* ---------- Demo Chat ---------- */
.demo-chat, .card-bd .chat, .chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.demo-chat .msg, .card-bd .chat .msg, .chat .msg {
  max-width: 78%;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.65;
}

.demo-chat .ai, .card-bd .chat .ai, .chat .ai {
  background: #eef4ff;
  border: 1px solid #d6e4ff;
  color: var(--brand);
  align-self: flex-start;
  border-radius: 8px 8px 8px 2px;
}

.demo-chat .me, .card-bd .chat .me, .chat .me {
  background: #e9f9ef;
  border: 1px solid #c9efd9;
  align-self: flex-end;
  border-radius: 8px 8px 2px 8px;
  color: #14532d;
}

/* ---------- Demo Legend ---------- */
.legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-tertiary);
  flex-wrap: wrap;
}

.legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  margin-right: 5px;
}

/* ---------- Badge dot (notification) ---------- */
.badge-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

/* ---------- Page header (demo style) ---------- */
.page-hd { margin-bottom: 14px; }
.page-hd h1 { font-size: 17px; margin: 0 0 4px; }
.page-hd p { margin: 0; color: var(--text-tertiary); font-size: 12.5px; }

/* ---------- Demo form-grid responsive ---------- */
@media (max-width: 1024px) {
  .card-bd .form-grid,
  .demo-form-grid,
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .card-bd .form-grid,
  .demo-form-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .bs-grid {
    grid-template-columns: 1fr;
  }
}
