/* =====================================================================
   KOSEN Student iFolio — Reusable Components
   ===================================================================== */

/* ---------- Buttons ---------- */
.btn {
  --btn-h: 40px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--btn-h); padding: 0 16px;
  border: 1px solid transparent; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 500; line-height: 1; white-space: nowrap;
  background: var(--white); color: var(--text);
  transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
  text-decoration: none; user-select: none; position: relative;
}
.btn .icon { width: 18px; height: 18px; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-ring); }
.btn:disabled, .btn.is-disabled { opacity: .5; pointer-events: none; cursor: not-allowed; }
.btn-sm { --btn-h: 34px; padding: 0 12px; font-size: 13px; border-radius: var(--radius); gap: 6px; }
.btn-sm .icon { width: 16px; height: 16px; }
.btn-lg { --btn-h: 44px; padding: 0 20px; border-radius: var(--radius-lg); }
.btn-xl { --btn-h: 48px; padding: 0 24px; border-radius: var(--radius-lg); font-size: 15px; }
.btn-block { display: flex; width: 100%; }
.btn-icon { width: var(--btn-h); padding: 0; }

.btn-primary { background: var(--primary); color: var(--white); box-shadow: var(--shadow-xs); }
.btn-primary:hover { background: var(--primary-hover); color: var(--white); }
.btn-primary:active { background: var(--primary-dark); }

.btn-outline { background: var(--white); border-color: var(--border); color: var(--text); box-shadow: var(--shadow-xs); }
.btn-outline:hover { background: var(--primary-extra-light); border-color: #CFE3F3; color: var(--primary); }

.btn-soft { background: var(--primary-light); color: var(--primary); }
.btn-soft:hover { background: #DCEEFA; color: var(--primary-hover); }

.btn-secondary { background: #F1F3F6; color: var(--text); border-color: #E7EAEE; }
.btn-secondary:hover { background: #E8EBEF; color: var(--text); }

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

.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #DC2626; color: var(--white); }
.btn-danger-outline { background: var(--white); color: var(--danger); border-color: #F5C2C2; }
.btn-danger-outline:hover { background: var(--danger-light); color: var(--danger-dark); }

.btn-link { background: none; border: 0; height: auto; padding: 0; color: var(--primary); font-weight: 500; }
.btn-link:hover { color: var(--primary-hover); text-decoration: underline; }

/* loading state */
.btn.is-loading { pointer-events: none; }
.btn.is-loading .btn-icon-slot { display: none; }
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite; display: inline-block; flex-shrink: 0;
}
.spinner-lg { width: 32px; height: 32px; border-width: 3px; color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-xs);
}
.card-sm { padding: 16px; }
.card-flush { padding: 0; overflow: hidden; }
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.card-header.bordered { margin: -24px -24px 20px; padding: 18px 24px; border-bottom: 1px solid var(--border); }
.card-title { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; }
.card-title .title-icon {
  width: 36px; height: 36px; border-radius: var(--radius-md); display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-light); color: var(--primary); flex-shrink: 0;
}
.card-title .title-icon .icon { width: 18px; height: 18px; }
.card-subtitle { color: var(--text-secondary); font-size: 13px; margin-top: 2px; font-weight: 400; }
.card-footer { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.card-link { display: block; color: inherit; transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition); }
.card-link:hover { color: inherit; border-color: #CFE3F3; box-shadow: var(--shadow-md); }

/* ---------- Page header ---------- */
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-header h1 { font-size: 22px; font-weight: 700; }
.page-header .page-subtitle { color: var(--text-secondary); margin-top: 4px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); font-size: 13px; margin-bottom: 10px; }
.back-link:hover { color: var(--primary); }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px 20px; }
.form-grid > .col-full { grid-column: span 6; }
.form-grid > .col-half { grid-column: span 3; }
.form-grid > .col-third { grid-column: span 2; }
@media (max-width: 767px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .form-grid > .col-full, .form-grid > .col-half, .form-grid > .col-third { grid-column: span 1; }
}
.form-group { display: flex; flex-direction: column; min-width: 0; }
.form-label { display: block; font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 6px; }
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-label .optional { color: var(--text-tertiary); font-weight: 400; font-size: 12px; margin-left: 4px; }
.form-control {
  display: block; width: 100%; height: 44px; padding: 0 14px;
  background: var(--white); border: 1px solid var(--input-border); border-radius: var(--radius);
  font-size: 14px; color: var(--text); transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none; -webkit-appearance: none;
}
.form-control::placeholder { color: #A0A7B1; }
.form-control:hover { border-color: #C9D2DC; }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.form-control:disabled, .form-control[readonly] { background: var(--surface-muted); color: var(--text-secondary); cursor: not-allowed; }
textarea.form-control { height: auto; min-height: 96px; padding: 10px 14px; line-height: 1.6; resize: vertical; }
select.form-control {
  padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
input[type="date"].form-control { padding-right: 10px; }
.form-control.is-invalid, .is-invalid .form-control { border-color: var(--danger); }
.form-control.is-invalid:focus, .is-invalid .form-control:focus { box-shadow: 0 0 0 3px rgba(239, 68, 68, .12); }
.form-help { color: var(--text-secondary); font-size: 12.5px; margin-top: 6px; }
.form-error { display: flex; align-items: flex-start; gap: 6px; color: var(--danger); font-size: 12.5px; margin-top: 6px; }
.form-error .icon { width: 14px; height: 14px; margin-top: 3px; }
.form-error:empty { display: none; }
.input-with-icon { position: relative; }
.input-with-icon .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-tertiary); width: 18px; height: 18px; }
.input-with-icon .form-control { padding-left: 42px; }
.readonly-field { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; background: var(--surface-muted); border: 1px dashed var(--input-border); border-radius: var(--radius); color: var(--text-secondary); }
.readonly-field .icon { width: 16px; height: 16px; }

.checkbox { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; line-height: 1.5; }
.checkbox input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--primary); flex-shrink: 0; cursor: pointer; }

.form-section-title { font-size: 15px; font-weight: 600; margin: 4px 0 14px; display: flex; align-items: center; gap: 8px; }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
@media (max-width: 767px) {
  .form-actions { flex-direction: column-reverse; }
  .form-actions .btn { width: 100%; }
}

/* ---------- Chips (interests) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: var(--radius-full); background: var(--white);
  font-size: 13px; color: var(--text); cursor: pointer; user-select: none;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.chip:hover { border-color: #CFE3F3; background: var(--primary-extra-light); }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip .chip-check { display: none; width: 14px; height: 14px; }
.chip:has(input:checked), .chip.is-selected { background: var(--primary-light); border-color: var(--primary); color: var(--primary); font-weight: 500; }
.chip:has(input:checked) .chip-check, .chip.is-selected .chip-check { display: inline-block; }
.chip:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--primary-ring); }
.chip-static { cursor: default; background: var(--primary-light); border-color: transparent; color: var(--primary); font-weight: 500; }
.chip-static:hover { background: var(--primary-light); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px;
  border-radius: var(--radius-full); font-size: 12px; font-weight: 500; white-space: nowrap;
  background: var(--surface-muted); color: var(--text-secondary);
}
.badge .icon { width: 13px; height: 13px; }
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--success-light); color: var(--success-dark); }
.badge-warning { background: var(--warning-light); color: var(--warning-dark); }
.badge-danger { background: var(--danger-light); color: var(--danger-dark); }
.badge-outline { background: var(--white); border: 1px solid var(--border); }
.badge-sm { height: 20px; padding: 0 8px; font-size: 11px; }

/* ---------- Alerts ---------- */
.alert {
  display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius-lg);
  border: 1px solid var(--border); background: var(--white); font-size: 14px;
}
.alert > .icon { width: 20px; height: 20px; margin-top: 1px; }
.alert-title { font-weight: 600; margin-bottom: 2px; }
.alert-info { background: var(--primary-extra-light); border-color: #CFE3F3; color: var(--primary-dark); }
.alert-info > .icon { color: var(--primary); }
.alert-success { background: var(--success-light); border-color: #BBF7D0; color: #14532D; }
.alert-success > .icon { color: var(--success); }
.alert-warning { background: var(--warning-light); border-color: #FDE68A; color: #78350F; }
.alert-warning > .icon { color: var(--warning); }
.alert-danger { background: var(--danger-light); border-color: #FECACA; color: #7F1D1D; }
.alert-danger > .icon { color: var(--danger); }
.alert .alert-body { flex: 1; min-width: 0; }
.alert .text-muted { color: inherit; opacity: .8; }

/* ---------- Progress ---------- */
.progress { width: 100%; height: 8px; background: #E9EEF4; border-radius: var(--radius-full); overflow: hidden; }
.progress-bar { height: 100%; background: var(--primary); border-radius: inherit; transition: width .4s ease; }
.progress-bar.is-complete { background: var(--success); }
.progress-sm { height: 6px; }
.progress-on-dark { background: rgba(255, 255, 255, .25); }
.progress-on-dark .progress-bar { background: var(--white); }

/* ---------- Avatar ---------- */
.avatar {
  --size: 40px;
  width: var(--size); height: var(--size); border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
  background: var(--primary-light); color: var(--primary); font-weight: 600; font-size: calc(var(--size) * .38);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { --size: 32px; }
.avatar-md { --size: 48px; }
.avatar-lg { --size: 72px; }
.avatar-xl { --size: 96px; }
.avatar-ring { box-shadow: 0 0 0 4px var(--white), 0 0 0 5px var(--border); }

/* ---------- Key / value rows ---------- */
.kv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
.kv-grid .kv-full { grid-column: 1 / -1; }
.kv-label { font-size: 13px; color: var(--text-secondary); margin-bottom: 2px; }
.kv-value { font-size: 14px; font-weight: 500; color: var(--text); overflow-wrap: anywhere; }
.kv-value.is-empty { color: var(--text-tertiary); font-weight: 400; }
@media (max-width: 767px) { .kv-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; } }

/* ---------- Empty state ---------- */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 32px 16px; border: 1px dashed var(--input-border); border-radius: var(--radius-lg); background: #FBFCFE;
}
.empty-state .empty-icon {
  width: 52px; height: 52px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-light); color: var(--primary); margin-bottom: 12px;
}
.empty-state .empty-icon .icon { width: 24px; height: 24px; }
.empty-state .empty-title { font-weight: 600; font-size: 14.5px; }
.empty-state .empty-text { color: var(--text-secondary); font-size: 13px; margin-top: 2px; }
.empty-state .btn { margin-top: 14px; }
.empty-state-lg { padding: 56px 16px; }

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(0, 0, 0, .45); opacity: 0; visibility: hidden;
  transition: opacity 160ms ease, visibility 160ms ease;
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal-dialog {
  width: 100%; max-width: 600px; max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  transform: translateY(8px) scale(.98); transition: transform 160ms ease;
}
.modal.is-open .modal-dialog { transform: none; }
.modal-sm .modal-dialog { max-width: 440px; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 24px 0; }
.modal-title { font-size: 17px; font-weight: 600; }
.modal-subtitle { color: var(--text-secondary); font-size: 13px; margin-top: 2px; }
.modal-close {
  width: 34px; height: 34px; border-radius: var(--radius); border: 0; background: transparent; color: var(--text-secondary);
  display: inline-flex; align-items: center; justify-content: center; margin: -6px -8px 0 0;
}
.modal-close:hover { background: var(--surface-muted); color: var(--text); }
.modal-body { padding: 18px 24px; overflow-y: auto; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px 20px; border-top: 1px solid var(--border); }
.modal-confirm .modal-body { display: flex; gap: 14px; padding-top: 24px; }
.modal-confirm .confirm-icon {
  width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--danger-light); color: var(--danger); flex-shrink: 0;
}
.modal-confirm .confirm-icon.is-primary { background: var(--primary-light); color: var(--primary); }
@media (max-width: 767px) {
  .modal-dialog { max-width: calc(100% - 0px); }
  .modal-footer { flex-direction: column-reverse; }
  .modal-footer .btn { width: 100%; }
}
body.modal-open { overflow: hidden; }

/* ---------- Toast (top-right) ---------- */
.toast-container {
  position: fixed; top: 16px; right: 16px; z-index: 1100; display: flex; flex-direction: column; gap: 10px;
  width: min(380px, calc(100vw - 32px)); pointer-events: none;
}
.toast {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 14px 14px 16px; pointer-events: auto;
  background: var(--white); border: 1px solid var(--border); border-left: 4px solid var(--primary);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); font-size: 14px;
  animation: toast-in 220ms ease;
}
.toast.is-leaving { animation: toast-out 200ms ease forwards; }
.toast > .icon { width: 20px; height: 20px; margin-top: 1px; }
.toast-body { flex: 1; min-width: 0; font-weight: 500; }
.toast-close { border: 0; background: none; color: var(--text-tertiary); padding: 2px; border-radius: 6px; display: inline-flex; }
.toast-close:hover { color: var(--text); background: var(--surface-muted); }
.toast-success { border-left-color: var(--success); }
.toast-success > .icon { color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-error > .icon { color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }
.toast-warning > .icon { color: var(--warning); }
.toast-info > .icon { color: var(--primary); }
@keyframes toast-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(16px); } }

/* ---------- Dropdown ---------- */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 220px;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 6px; display: none;
}
.dropdown.is-open .dropdown-menu { display: block; }
.dropdown-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none;
  border-radius: var(--radius); color: var(--text); font-size: 14px; text-align: left;
}
.dropdown-item .icon { width: 17px; height: 17px; color: var(--text-secondary); }
.dropdown-item:hover { background: var(--primary-extra-light); color: var(--primary); }
.dropdown-item:hover .icon { color: var(--primary); }
.dropdown-item.is-danger { color: var(--danger); }
.dropdown-item.is-danger .icon { color: var(--danger); }
.dropdown-item.is-danger:hover { background: var(--danger-light); }
.dropdown-divider { height: 1px; background: var(--border); margin: 6px 0; }
.dropdown-header { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }

/* ---------- Stepper ---------- */
.stepper { display: flex; align-items: flex-start; gap: 0; counter-reset: step; }
.step { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; min-width: 0; }
.step::before {
  content: ''; position: absolute; top: 17px; left: calc(-50% + 22px); right: calc(50% + 22px); height: 2px;
  background: var(--border);
}
.step:first-child::before { display: none; }
.step-circle {
  width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--white); border: 2px solid var(--border); color: var(--text-secondary); font-weight: 600; font-size: 14px;
  position: relative; z-index: 1; transition: all var(--transition);
}
.step-circle .icon { width: 18px; height: 18px; }
.step-label { margin-top: 8px; font-size: 13px; color: var(--text-secondary); font-weight: 500; padding: 0 4px; }
.step.is-active .step-circle { border-color: var(--primary); background: var(--primary); color: var(--white); box-shadow: 0 0 0 4px var(--primary-ring); }
.step.is-active .step-label { color: var(--primary); font-weight: 600; }
.step.is-done .step-circle { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.step.is-done::before, .step.is-active::before { background: var(--primary); }
@media (max-width: 575px) {
  .step-label { font-size: 11.5px; }
  .step-circle { width: 32px; height: 32px; font-size: 13px; }
  .step::before { top: 15px; }
}

/* ---------- File uploader ---------- */
.file-drop {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  gap: 6px; padding: 22px 16px; border: 1.5px dashed #C8D3DF; border-radius: var(--radius-lg); background: #FBFCFE;
  cursor: pointer; transition: border-color var(--transition), background var(--transition);
}
.file-drop:hover, .file-drop.is-dragover { border-color: var(--primary); background: var(--primary-extra-light); }
.file-drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.file-drop .drop-icon {
  width: 42px; height: 42px; border-radius: 50%; background: var(--primary-light); color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
}
.file-drop .drop-title { font-weight: 500; }
.file-drop .drop-title span { color: var(--primary); }
.file-drop .drop-hint { font-size: 12.5px; color: var(--text-secondary); }
.file-drop.is-invalid { border-color: var(--danger); background: var(--danger-light); }

.file-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.file-list:empty { display: none; }
.file-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-md); background: var(--white);
}
.file-thumb {
  width: 44px; height: 44px; border-radius: var(--radius); flex-shrink: 0; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; background: var(--surface-muted); color: var(--text-secondary);
}
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-thumb.is-pdf { background: #FEF2F2; color: #DC2626; }
.file-thumb .icon { width: 20px; height: 20px; }
.file-meta { flex: 1; min-width: 0; }
.file-name { font-weight: 500; font-size: 13.5px; }
.file-sub { font-size: 12px; color: var(--text-secondary); }
.file-actions { display: flex; gap: 4px; flex-shrink: 0; }
.file-item.is-error { border-color: #FECACA; background: var(--danger-light); }
.file-item.is-error .file-sub { color: var(--danger); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 500; color: var(--text-secondary); background: #FAFBFD; padding: 11px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; font-size: 13px; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }

/* ---------- Pagination ---------- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 20px; }
.pagination a, .pagination span {
  min-width: 36px; height: 36px; padding: 0 10px; border-radius: var(--radius); display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: var(--white); color: var(--text); font-size: 14px;
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .is-active { background: var(--primary); border-color: var(--primary); color: var(--white); }
.pagination .is-disabled { opacity: .5; pointer-events: none; }

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.icon-box {
  width: 40px; height: 40px; border-radius: var(--radius-md); display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-light); color: var(--primary); flex-shrink: 0;
}
.icon-box .icon { width: 20px; height: 20px; }
.icon-box.is-success { background: var(--success-light); color: var(--success-dark); }
.icon-box.is-warning { background: var(--warning-light); color: var(--warning-dark); }
.icon-box.is-danger { background: var(--danger-light); color: var(--danger); }
.icon-box.is-gray { background: var(--surface-muted); color: var(--text-secondary); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); display: inline-block; }
.list-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); color: inherit;
}
.list-row:last-child { border-bottom: 0; padding-bottom: 0; }
.list-row:first-child { padding-top: 0; }
a.list-row:hover .list-row-title { color: var(--primary); }
.list-row-title { font-weight: 600; transition: color var(--transition); }
.list-row-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--text-secondary); font-size: 13px; margin-top: 2px; }
.list-row .chev { color: var(--text-tertiary); width: 18px; height: 18px; }
.skeleton { background: linear-gradient(90deg, #EEF2F6 25%, #F6F8FB 37%, #EEF2F6 63%); background-size: 400% 100%; animation: skeleton 1.2s ease infinite; border-radius: var(--radius); }
@keyframes skeleton { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
