/* ============================================================
   LPK BEAUTY — COMPONENTS CSS
   Version: 1.2 (fixed modal + sidebar overlay)
   ============================================================ */

/* ============================================================
   1. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
  font-family: inherit;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn svg { width: 16px; height: 16px; }

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn-primary:active { transform: translateY(1px); }

.btn-secondary {
  background: var(--bg-body);
  color: var(--text-primary);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}
.btn-secondary:active { transform: translateY(1px); }

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

.btn-danger {
  background: var(--danger);
  color: #FFFFFF;
  border-color: var(--danger);
}
.btn-danger:hover {
  background: #991B1B;
  border-color: #991B1B;
}

.btn-danger-outline {
  background: var(--bg-body);
  color: var(--danger);
  border-color: var(--danger-border);
}
.btn-danger-outline:hover {
  background: var(--danger-bg);
  border-color: var(--danger);
}

.btn-success {
  background: var(--success);
  color: #FFFFFF;
  border-color: var(--success);
}
.btn-success:hover {
  background: #166534;
  border-color: #166534;
}

.btn-sm { padding: 6px 12px; font-size: 12.5px; gap: 6px; }
.btn-sm svg { width: 14px; height: 14px; }

.btn-lg { padding: 12px 22px; font-size: 14.5px; }
.btn-lg svg { width: 18px; height: 18px; }

.btn-icon {
  padding: 8px;
  width: 34px;
  height: 34px;
  gap: 0;
}
.btn-icon svg { width: 16px; height: 16px; }
.btn-icon.btn-sm { width: 28px; height: 28px; padding: 0; }
.btn-icon.btn-sm svg { width: 14px; height: 14px; }

.btn-block { width: 100%; }

/* ============================================================
   2. CARDS
   ============================================================ */
.card {
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5);
  transition: all var(--transition-fast);
}

.card-sm { padding: var(--space-4); }
.card-lg { padding: var(--space-6); }

.card-hover { cursor: pointer; }
.card-hover:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

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

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.card-title svg { color: var(--text-secondary); }

.card-subtitle {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: var(--space-1);
  font-weight: 400;
}

.card-footer {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
}

/* ============================================================
   3. BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  border: 1px solid transparent;
}

.badge svg { width: 11px; height: 11px; }

.badge-neutral { background: var(--bg-hover); color: var(--text-secondary); border-color: var(--border); }
.badge-success { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.badge-warning { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.badge-danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.badge-info { background: var(--info-bg); color: var(--info); border-color: var(--info-border); }
.badge-dark { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }

.badge-pill { border-radius: var(--radius-full); padding: 3px 10px; }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ============================================================
   4. FORMS
   ============================================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--space-4);
}

.form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-label.required::after {
  content: '*';
  color: var(--danger);
  font-weight: 700;
  margin-left: 2px;
}

.form-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.form-error {
  font-size: 11.5px;
  color: var(--danger);
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 9px 12px;
  font-size: 13.5px;
  color: var(--text-primary);
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  outline: none;
  font-family: inherit;
}

.form-control::placeholder { color: var(--text-muted); }
.form-control:hover:not(:disabled) { border-color: var(--border-strong); }
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}
.form-control:disabled {
  background: var(--bg-subtle);
  color: var(--text-muted);
  cursor: not-allowed;
}
.form-control.has-error { border-color: var(--danger); }
.form-control.has-error:focus { box-shadow: 0 0 0 3px var(--danger-bg); }

textarea.form-control {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}

select.form-control {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2352525B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
  padding-right: 34px;
  cursor: pointer;
}

.form-control-icon {
  position: relative;
  display: flex;
  align-items: center;
}
.form-control-icon svg {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
  width: 16px;
  height: 16px;
}
.form-control-icon .form-control { padding-left: 38px; }

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  padding: 6px 0;
}
.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}
.form-check-label {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
  cursor: pointer;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}
.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}
.form-actions-left { margin-right: auto; }

/* ============================================================
   5. MODAL
   ============================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  overflow-y: auto;
}

.modal-overlay.show {
  display: flex;
  animation: modalFadeIn 0.15s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalSlideIn {
  from { transform: translateY(10px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal {
  background: var(--bg-body);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.2s ease;
}

.modal-sm { max-width: 380px; }
.modal-lg { max-width: 640px; }
.modal-xl { max-width: 880px; }
.modal-full { max-width: 1080px; }

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

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.modal-close {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition-fast);
  flex-shrink: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.modal-close svg { width: 18px; height: 18px; }

.modal-body {
  padding: var(--space-6);
  overflow-y: auto;
  flex: 1;
}
.modal-body .form-group:last-child { margin-bottom: 0; }

.modal-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  flex-shrink: 0;
}
/* ============================================================
   6. TOAST
   ============================================================ */
.toast-container {
  position: fixed;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 400px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: 12px 14px;
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  color: var(--text-primary);
  opacity: 0;
  transform: translateX(20px);
  transition: all var(--transition);
  pointer-events: auto;
  max-width: 100%;
}
.toast.show { opacity: 1; transform: translateX(0); }

.toast-icon { flex-shrink: 0; margin-top: 1px; display: flex; }
.toast-icon svg { width: 16px; height: 16px; }

.toast-message { flex: 1; line-height: 1.5; word-break: break-word; }

.toast-close {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.toast-close:hover { background: var(--bg-hover); color: var(--text-primary); }
.toast-close svg { width: 14px; height: 14px; }

.toast-success { border-left: 3px solid var(--success); }
.toast-success .toast-icon { color: var(--success); }
.toast-error { border-left: 3px solid var(--danger); }
.toast-error .toast-icon { color: var(--danger); }
.toast-warning { border-left: 3px solid var(--warning); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info { border-left: 3px solid var(--info); }
.toast-info .toast-icon { color: var(--info); }

/* ============================================================
   7. SPINNER & LOADING
   ============================================================ */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
.spinner-sm { width: 14px; height: 14px; border-width: 1.5px; }
.spinner-lg { width: 32px; height: 32px; border-width: 3px; }

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

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-12) var(--space-4);
  color: var(--text-muted);
  font-size: 13px;
}

/* ============================================================
   8. EMPTY STATE
   ============================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-12) var(--space-4);
}
.empty-state-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}
.empty-state-icon svg { width: 28px; height: 28px; }
.empty-state-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}
.empty-state-message {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
  max-width: 320px;
}

/* ============================================================
   9. TABLE
   ============================================================ */
.table-wrapper {
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.table-scroll { overflow-x: auto; }

.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table thead { background: var(--bg-subtle); }
.table th {
  text-align: left;
  padding: 11px 16px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.table td {
  padding: 14px 16px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background var(--transition-fast); }
.table tbody tr:hover { background: var(--bg-subtle); }

.table-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
}

/* ============================================================
   10. TABS
   ============================================================ */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-5);
  overflow-x: auto;
}
.tab {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}
.tab:hover { color: var(--text-primary); }
.tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
  font-weight: 600;
}
.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  font-size: 10.5px;
  font-weight: 600;
  background: var(--bg-hover);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
}
.tab.active .tab-count {
  background: var(--accent);
  color: var(--accent-text);
}

/* ============================================================
   11. SEGMENTED CONTROL
   ============================================================ */
.segmented {
  display: inline-flex;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 2px;
}
.segmented button {
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
  white-space: nowrap;
}
.segmented button:hover { color: var(--text-primary); }
.segmented button.active {
  background: var(--bg-body);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

/* ============================================================
   12. DROPDOWN
   ============================================================ */
.dropdown { position: relative; display: inline-block; }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 180px;
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 4px;
  z-index: 50;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: all var(--transition-fast);
  visibility: hidden;
}
.dropdown-menu.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--text-primary);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background var(--transition-fast);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.dropdown-item:hover { background: var(--bg-hover); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger:hover { background: var(--danger-bg); }
.dropdown-item svg { width: 14px; height: 14px; }

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

/* ============================================================
   13. SEARCH INPUT
   ============================================================ */
.search-input {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}
.search-input svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  width: 15px;
  height: 15px;
}
.search-input input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-body);
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition-fast);
  font-family: inherit;
}
.search-input input::placeholder { color: var(--text-muted); }
.search-input input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

/* ============================================================
   14. AVATAR
   ============================================================ */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--accent-subtle);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.avatar-lg { width: 48px; height: 48px; font-size: 16px; }

/* ============================================================
   15. DIVIDER
   ============================================================ */
.divider { height: 1px; background: var(--border); margin: var(--space-4) 0; }

.divider-text {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-4) 0;
  color: var(--text-muted);
  font-size: 12px;
}
.divider-text::before,
.divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ============================================================
   16. PHOTO GRID
   ============================================================ */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 6px;
}
.photo-grid .photo-item {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  position: relative;
  cursor: pointer;
}
.photo-grid .photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-fast);
}
.photo-grid .photo-item:hover img { transform: scale(1.05); }

/* ============================================================
   17. SKELETON
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, var(--bg-subtle) 0%, var(--bg-hover) 50%, var(--bg-subtle) 100%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.4s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-text { height: 12px; margin-bottom: 6px; }
.skeleton-text-sm { height: 10px; }
.skeleton-title { height: 18px; width: 60%; }
.skeleton-avatar { width: 36px; height: 36px; border-radius: var(--radius-full); }

/* ============================================================
   18. PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: var(--space-6);
  flex-wrap: wrap;
}
.pagination button {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-body);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.pagination button:hover:not(:disabled):not(.active) {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}
.pagination button.active {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
  font-weight: 600;
}
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }
.pagination button svg { width: 14px; height: 14px; }

/* ============================================================
   19. MODAL WARNING
   ============================================================ */
.modal-warning {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-sm);
  line-height: 1.5;
}
.modal-warning svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ============================================================
   20. COLOR INPUT
   ============================================================ */
.form-control-color {
  padding: 4px;
  height: 40px;
  width: 100%;
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.form-control-color::-webkit-color-swatch-wrapper { padding: 0; }
.form-control-color::-webkit-color-swatch { border: none; border-radius: var(--radius-xs); }
.form-control-color::-moz-color-swatch { border: none; border-radius: var(--radius-xs); }

/* ============================================================
   21. MATERIALS CHECKLIST (buat form treatment)
   ============================================================ */
.materials-checklist {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  background: var(--bg-subtle);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.material-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  background: var(--bg-body);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}
.material-checkbox:hover {
  background: var(--bg-hover);
  border-color: var(--border);
}
.material-checkbox:has(input:checked) {
  background: var(--accent-subtle);
  border-color: var(--accent);
}
.material-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}
.material-checkbox-body { flex: 1; min-width: 0; }
.material-checkbox-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}
.material-checkbox-code {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'SF Mono', 'Monaco', monospace;
  margin-top: 2px;
  letter-spacing: 0.02em;
}

/* ============================================================
   22. RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }

  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .modal {
    max-width: 100%;
    max-height: 92vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    transform: translateY(100%);
  }
  .modal-overlay.show .modal { transform: translateY(0); }

  .toast-container {
    top: auto;
    bottom: var(--space-4);
    right: var(--space-4);
    left: var(--space-4);
    max-width: none;
  }
  .toast { transform: translateY(20px); }
  .toast.show { transform: translateY(0); }

  .search-input { max-width: none; }
  .btn-lg { padding: 11px 18px; font-size: 14px; }

  .materials-checklist { max-height: 260px; }
  .material-checkbox { padding: 9px 10px; }
}

@media (max-width: 480px) {
  .btn { padding: 8px 14px; font-size: 13px; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .btn { width: 100%; }
}
