/* ============================================================
   LCR MANDAL ERP — COMPONENTS
   Buttons, Cards, Badges, Forms, Tables, Modals, Toasts
   ============================================================ */

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 9px var(--space-5);
  font-size: var(--text-sm);
  font-weight: var(--fw-semi);
  line-height: 1;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  transition: all var(--duration) var(--ease-out);
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.01em;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}

/* Primary */
.btn-primary {
  background: linear-gradient(135deg, var(--primary-mid), var(--primary-dark));
  color: white;
  box-shadow: 0 2px 8px rgba(183,28,28,0.28);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary), var(--primary-mid));
  box-shadow: 0 4px 16px rgba(183,28,28,0.38);
  transform: translateY(-1px);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }

/* Gold */
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #1A0A0A;
  box-shadow: 0 2px 8px rgba(212,175,55,0.3);
}
.btn-gold:hover:not(:disabled) {
  box-shadow: 0 4px 16px rgba(212,175,55,0.45);
  transform: translateY(-1px);
}

/* Secondary */
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--bg-secondary);
  border-color: var(--text-muted);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover:not(:disabled) {
  background: var(--bg-secondary);
  color: var(--text);
}

/* Danger */
.btn-danger {
  background: linear-gradient(135deg, var(--danger), #B91C1C);
  color: white;
  box-shadow: 0 2px 8px rgba(220,38,38,0.25);
}
.btn-danger:hover:not(:disabled) {
  box-shadow: 0 4px 16px rgba(220,38,38,0.38);
  transform: translateY(-1px);
}

/* Sizes */
.btn-xs { padding: 5px 10px; font-size: var(--text-xs); }
.btn-sm { padding: 7px var(--space-4); font-size: var(--text-sm); }
.btn-lg { padding: 12px var(--space-8); font-size: var(--text-md); border-radius: var(--radius-md); }
.btn-xl { padding: 15px var(--space-10); font-size: var(--text-lg); border-radius: var(--radius-md); }

/* Icon button */
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius);
  flex-shrink: 0;
}
.btn-icon.btn-sm { width: 30px; height: 30px; }
.btn-icon.btn-lg { width: 44px; height: 44px; }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--duration) var(--ease-out),
              transform var(--duration) var(--ease-out);
}

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

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: var(--text-base);
  font-weight: var(--fw-semi);
  color: var(--text);
}

.card-subtitle {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

.card-body {
  padding: var(--space-6);
}

.card-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}

/* Glass Card */
.card-glass {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}

/* KPI Card */
.kpi-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: var(--space-6);
  position: relative;
  overflow: hidden;
  transition: all var(--duration) var(--ease-out);
  cursor: default;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--kpi-color, var(--primary));
}

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

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

.kpi-card .kpi-value {
  font-size: 32px;
  font-weight: var(--fw-black);
  line-height: 1;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.kpi-card .kpi-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: var(--fw-medium);
}

.kpi-card .kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: var(--text-xs);
  font-weight: var(--fw-semi);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  margin-top: var(--space-3);
}

.kpi-trend.up   { color: var(--success); background: var(--success-light); }
.kpi-trend.down { color: var(--danger);  background: var(--danger-light); }
.kpi-trend.neutral { color: var(--text-muted); background: var(--bg-secondary); }

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: var(--text-xs);
  font-weight: var(--fw-semi);
  border-radius: var(--radius-full);
  line-height: 1.4;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-success  { background: var(--success-light); color: var(--success); }
.badge-warning  { background: var(--warning-light); color: var(--warning); }
.badge-danger   { background: var(--danger-light);  color: var(--danger); }
.badge-info     { background: var(--info-light);    color: var(--info); }
.badge-primary  { background: var(--primary-light); color: var(--primary); }
.badge-gold     { background: var(--gold-light);    color: var(--gold-dark); }
.badge-muted    { background: var(--bg-secondary);  color: var(--text-secondary); }

/* Filled badges */
.badge-filled-primary { background: var(--primary); color: white; }
.badge-filled-success { background: var(--success); color: white; }
.badge-filled-gold    { background: var(--gold);    color: #1A0A0A; }

/* ── Forms ──────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
}

.form-label.required::after {
  content: ' *';
  color: var(--danger);
}

.form-control {
  width: 100%;
  padding: 10px var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--fw-regular);
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
  outline: none;
  transition: all var(--duration-fast) var(--ease);
  line-height: 1.5;
}

.form-control:hover {
  border-color: var(--text-muted);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-alpha);
}

.form-control::placeholder {
  color: var(--text-muted);
  font-weight: var(--fw-regular);
}

.form-control:disabled {
  background: var(--bg-secondary);
  color: var(--text-muted);
  cursor: not-allowed;
}

.form-control.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-alpha);
}

textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control   { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236B7280'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 36px; }

.form-hint  { font-size: var(--text-xs); color: var(--text-muted); }
.form-error { font-size: var(--text-xs); color: var(--danger); }

/* Input with Icon */
.input-group {
  position: relative;
}
.input-group .form-control {
  padding-left: 38px;
}
.input-group .input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 15px;
  display: flex;
}

.input-group .input-icon-right {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 15px;
  display: flex;
}

/* Search input */
.search-input {
  padding-left: 38px;
  background: var(--bg-secondary);
  border-color: transparent;
}
.search-input:focus {
  background: var(--surface);
  border-color: var(--primary);
}

/* Checkbox & Radio */
.form-check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}
.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}
.form-check-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* Toggle Switch */
.toggle {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border-strong);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--duration) var(--ease);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  transition: transform var(--duration) var(--ease);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ── Data Table ─────────────────────────────────────────────── */
.data-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.data-table thead {
  background: var(--bg-secondary);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}

.data-table thead th {
  padding: 12px var(--space-5);
  font-size: var(--text-xs);
  font-weight: var(--fw-semi);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: color var(--duration-fast);
}

.data-table thead th:hover { color: var(--text); }

.data-table thead th .sort-icon {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  margin-left: 4px;
  vertical-align: middle;
  opacity: 0.4;
}
.data-table thead th.sorted .sort-icon { opacity: 1; color: var(--primary); }

.data-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--duration-fast);
}

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

.data-table tbody tr:hover {
  background: var(--primary-lighter);
}

.data-table tbody tr.selected {
  background: var(--primary-alpha);
}

.data-table td {
  padding: 14px var(--space-5);
  font-size: var(--text-sm);
  color: var(--text);
  vertical-align: middle;
}

.data-table .td-photo img {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--border);
}

.data-table .td-actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  opacity: 0;
  transition: opacity var(--duration-fast);
}
.data-table tr:hover .td-actions { opacity: 1; }

/* Checkbox column */
.td-check, .th-check {
  width: 44px;
  padding-left: var(--space-5) !important;
}

/* Table toolbar */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
  gap: var(--space-3);
  flex-wrap: wrap;
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.table-toolbar-left  { display: flex; align-items: center; gap: var(--space-3); }
.table-toolbar-right { display: flex; align-items: center; gap: var(--space-2); }

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  justify-content: flex-end;
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border);
  background: var(--surface);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast);
  border: 1px solid transparent;
}
.page-btn:hover { background: var(--bg-secondary); color: var(--text); }
.page-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  font-weight: var(--fw-semi);
}

.page-info {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin: 0 var(--space-3);
}

/* ── Modals ─────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  animation: modalBackdropIn var(--duration) var(--ease-out);
}

.modal-backdrop.hidden { display: none; }

.modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalContentIn var(--duration-slow) var(--ease-out);
}

.modal-lg  { max-width: 800px; }
.modal-xl  { max-width: 1100px; }
.modal-sm  { max-width: 420px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-title {
  font-size: var(--text-lg);
  font-weight: var(--fw-semi);
  color: var(--text);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--duration-fast);
}
.modal-close:hover { background: var(--bg-secondary); color: var(--text); }

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

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  flex-shrink: 0;
}

/* ── Toast Notifications ────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: var(--space-5);
  right: var(--space-5);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--toast-color, var(--primary));
  max-width: 360px;
  pointer-events: auto;
  animation: toastSlideIn 0.4s var(--ease-out) both;
}

.toast.exiting {
  animation: toastSlideOut 0.35s var(--ease-in) both;
}

.toast-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  margin-top: 1px;
}

.toast-content { flex: 1; }
.toast-title { font-size: var(--text-sm); font-weight: var(--fw-semi); color: var(--text); }
.toast-message { font-size: var(--text-xs); color: var(--text-secondary); margin-top: 2px; }

.toast-close {
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  font-size: 14px;
  line-height: 1;
  padding: 2px;
}
.toast-close:hover { color: var(--text); }

/* Toast variants */
.toast-success { --toast-color: var(--success); }
.toast-warning { --toast-color: var(--warning); }
.toast-error   { --toast-color: var(--danger); }
.toast-info    { --toast-color: var(--info); }

/* ── Dropdown ───────────────────────────────────────────────── */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  z-index: var(--z-dropdown);
  overflow: hidden;
  animation: scaleIn var(--duration) var(--ease-out);
  transform-origin: top right;
}

.dropdown-menu.hidden { display: none; }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 9px var(--space-4);
  font-size: var(--text-sm);
  color: var(--text);
  cursor: pointer;
  transition: background var(--duration-fast);
}
.dropdown-item:hover { background: var(--bg-secondary); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger:hover { background: var(--danger-light); }

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* ── Stepper ────────────────────────────────────────────────── */
.stepper {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: var(--space-8);
  position: relative;
}

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

.step::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  right: -50%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.step:last-child::before { display: none; }

.step.completed::before { background: var(--primary); }

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: var(--fw-semi);
  color: var(--text-muted);
  position: relative;
  z-index: 1;
  transition: all var(--duration) var(--ease-out);
}

.step.active .step-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 0 0 4px var(--primary-alpha);
}

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

.step-label {
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  margin-top: var(--space-2);
  text-align: center;
  white-space: nowrap;
}

.step.active .step-label   { color: var(--primary); font-weight: var(--fw-semi); }
.step.completed .step-label { color: var(--success); }

/* ── Tabs ───────────────────────────────────────────────────── */
.tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  padding: 0 var(--space-1);
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: all var(--duration-fast);
  white-space: nowrap;
  border-radius: var(--radius) var(--radius) 0 0;
}

.tab-btn:hover { color: var(--text); background: var(--bg-secondary); }

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: var(--fw-semi);
}

.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--fw-semi);
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.tab-btn.active .tab-count {
  background: var(--primary-light);
  color: var(--primary);
}

/* Pill tabs variant */
.tabs-pills {
  display: flex;
  gap: var(--space-1);
  padding: 4px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: none;
}

.tabs-pills .tab-btn {
  border-bottom: none;
  border-radius: var(--radius);
  margin: 0;
  padding: 7px var(--space-4);
}

.tabs-pills .tab-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* ── Avatar ─────────────────────────────────────────────────── */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  font-weight: var(--fw-semi);
  color: white;
  background: var(--primary);
  font-size: var(--text-sm);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-xs { width: 24px; height: 24px; font-size: var(--text-xs); }
.avatar-sm { width: 32px; height: 32px; font-size: var(--text-xs); }
.avatar-md { width: 40px; height: 40px; }
.avatar-lg { width: 52px; height: 52px; font-size: var(--text-lg); }
.avatar-xl { width: 72px; height: 72px; font-size: var(--text-2xl); }

.avatar-group {
  display: flex;
}
.avatar-group .avatar {
  border: 2px solid var(--surface);
  margin-left: -8px;
}
.avatar-group .avatar:first-child { margin-left: 0; }

/* ── Divider ────────────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Empty State ────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-16) var(--space-8);
  gap: var(--space-4);
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-xl);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin-bottom: var(--space-2);
}

.empty-state-title {
  font-size: var(--text-xl);
  font-weight: var(--fw-semi);
  color: var(--text);
}

.empty-state-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  max-width: 360px;
  line-height: var(--lh-relaxed);
}

/* ── Progress Bar ───────────────────────────────────────────── */
.progress {
  height: 6px;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary), var(--primary-mid));
  transition: width 0.8s var(--ease-out);
}

.progress-bar.gold { background: linear-gradient(90deg, var(--gold-dark), var(--gold)); }
.progress-bar.success { background: var(--success); }

/* ── Tooltip ────────────────────────────────────────────────── */
[data-tooltip] {
  position: relative;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: white;
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  padding: 5px 10px;
  border-radius: var(--radius);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-fast);
  z-index: var(--z-tooltip);
}
[data-tooltip]:hover::after { opacity: 1; }

/* ── Tag Input ──────────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 3px var(--space-3);
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  border-radius: var(--radius-full);
}
.tag .tag-remove {
  cursor: pointer;
  opacity: 0.6;
  transition: opacity var(--duration-fast);
  font-size: 10px;
}
.tag .tag-remove:hover { opacity: 1; }

/* ── Chip ───────────────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 5px var(--space-3);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--duration-fast);
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

/* ── Alert Box ──────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
}
.alert-success { background: var(--success-light); color: #15803D; border: 1px solid rgba(22,163,74,0.2); }
.alert-warning { background: var(--warning-light); color: #B45309; border: 1px solid rgba(217,119,6,0.2); }
.alert-danger  { background: var(--danger-light);  color: #B91C1C; border: 1px solid rgba(220,38,38,0.2); }
.alert-info    { background: var(--info-light);    color: #1D4ED8; border: 1px solid rgba(37,99,235,0.2); }

/* ── Section Header ─────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

.section-title {
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
  color: var(--text);
  line-height: var(--lh-snug);
}

.section-subtitle {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Gold Ornament Divider ──────────────────────────────────── */
.ornament-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-4) 0;
}
.ornament-divider::before,
.ornament-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}
.ornament-divider .ornament-dot {
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  position: relative;
}
.ornament-divider .ornament-dot::before,
.ornament-divider .ornament-dot::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 4px;
  height: 4px;
  background: var(--gold-dark);
  border-radius: 50%;
  transform: translateY(-50%);
}
.ornament-divider .ornament-dot::before { right: calc(100% + 6px); }
.ornament-divider .ornament-dot::after  { left:  calc(100% + 6px); }
