/* ════════════════════════════════════════════════════
   ASSET LIST  —  css/asset-list.css
   Shared styles for all asset list pages
════════════════════════════════════════════════════ */

.asset-list-page {
  padding: var(--space-8);
  min-height: calc(100vh - var(--header-h, 56px));
  background: var(--surface, #F7F7FB);
}

/* ── Page header ──────────────────────── */
.al-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  gap: var(--space-4);
  flex-wrap: wrap;
}
.al-header-left h1 {
  font-family: var(--font-display, 'DM Serif Display', Georgia, serif);
  font-size: var(--text-xl, 1.5rem);
  font-weight: 700;
  color: var(--ink, #1A1A2E);
  margin-bottom: 4px;
}
.al-header-left p {
  font-size: var(--text-sm, 0.8125rem);
  color: var(--ink-muted, #5A5A72);
  line-height: 1.5;
}
.al-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* ── Buttons ──────────────────────────── */
.al-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: var(--radius-md, 8px);
  font-size: var(--text-sm, 0.8125rem);
  font-weight: 500;
  font-family: var(--font-body, 'DM Sans', sans-serif);
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.al-btn-primary {
  background: var(--brand-orange, #E8650A);
  color: #fff;
  border-color: var(--brand-orange, #E8650A);
}
.al-btn-primary:hover { background: #c9540a; border-color: #c9540a; }
.al-btn-outline {
  background: #fff;
  color: var(--ink, #1A1A2E);
  border-color: var(--border, #E2E2EC);
}
.al-btn-outline:hover { background: var(--surface-raised, #EDEDF5); }

/* ── Table card ───────────────────────── */
.al-card {
  background: var(--surface-card, #FFFFFF);
  border: 1px solid var(--border, #E2E2EC);
  border-radius: var(--radius-lg, 14px);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* ── Search / filter bar ─────────────── */
.al-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--border, #E2E2EC);
  gap: var(--space-3);
  flex-wrap: wrap;
}
.al-search-wrap {
  position: relative;
  flex: 1;
  max-width: 320px;
}
.al-search-wrap svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-faint, #9898AE);
  pointer-events: none;
}
.al-search {
  width: 100%;
  padding: 7px 12px 7px 34px;
  border: 1px solid var(--border, #E2E2EC);
  border-radius: var(--radius-md, 8px);
  font-size: var(--text-sm, 0.8125rem);
  font-family: var(--font-body, 'DM Sans', sans-serif);
  color: var(--ink, #1A1A2E);
  background: var(--surface, #F7F7FB);
  outline: none;
  transition: border-color 0.15s;
}
.al-search:focus { border-color: var(--brand-orange, #E8650A); }
.al-search::placeholder { color: var(--ink-faint, #9898AE); }
.al-count {
  font-size: var(--text-sm, 0.8125rem);
  color: var(--ink-muted, #5A5A72);
  white-space: nowrap;
}

/* ── Table ────────────────────────────── */
.al-table-wrap { overflow-x: auto; }
.al-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm, 0.8125rem);
}
.al-table thead {
  background: var(--surface, #F7F7FB);
  border-bottom: 1px solid var(--border, #E2E2EC);
}
.al-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-faint, #9898AE);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  user-select: none;
}
.al-table th:last-child { text-align: center; width: 52px; }
.al-table tbody tr {
  border-bottom: 1px solid var(--border, #E2E2EC);
  transition: background 0.12s;
}
.al-table tbody tr:last-child { border-bottom: none; }
.al-table tbody tr:hover { background: var(--surface, #F7F7FB); }
.al-table td {
  padding: 13px 16px;
  color: var(--ink, #1A1A2E);
  vertical-align: middle;
}
.al-table td:last-child { text-align: center; }
.al-cell-title { font-weight: 600; color: var(--ink, #1A1A2E); }
.al-cell-trunc {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-muted, #5A5A72);
}
.al-cell-muted { color: var(--ink-muted, #5A5A72); }
.al-cell-faint { color: var(--ink-faint, #9898AE); font-size: 0.75rem; }

/* ── Kebab menu ───────────────────────── */
.al-kebab-wrap {
  position: relative;
  display: inline-flex;
  justify-content: center;
}
.al-kebab-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-faint, #9898AE);
  border-radius: var(--radius-sm, 4px);
  padding: 4px 6px;
  transition: background 0.12s, color 0.12s;
  line-height: 1;
  font-size: 18px;
}
.al-kebab-btn:hover { background: var(--surface-raised, #EDEDF5); color: var(--ink, #1A1A2E); }
.al-kebab-menu {
  position: fixed;
  background: var(--surface-card, #fff);
  border: 1px solid var(--border, #E2E2EC);
  border-radius: var(--radius-md, 8px);
  box-shadow: var(--shadow-md);
  z-index: 9999;
  min-width: 140px;
  padding: 4px 0;
  display: none;
}
.al-kebab-menu.open { display: block; }
.al-kebab-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  font-size: var(--text-sm, 0.8125rem);
  color: var(--ink, #1A1A2E);
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-body, 'DM Sans', sans-serif);
  transition: background 0.12s;
}
.al-kebab-item:hover { background: var(--surface, #F7F7FB); }
.al-kebab-item.danger { color: #ef4444; }
.al-kebab-item.danger:hover { background: #fef2f2; }

/* ── Empty state ──────────────────────── */
.al-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  text-align: center;
  gap: var(--space-4);
}
.al-empty-icon { width: 56px; height: 56px; opacity: 0.2; }
.al-empty h3 { font-size: var(--text-base, 0.9375rem); font-weight: 600; color: var(--ink, #1A1A2E); }
.al-empty p { font-size: var(--text-sm, 0.8125rem); color: var(--ink-muted, #5A5A72); max-width: 300px; line-height: 1.6; }

/* ── Responsive ───────────────────────── */
@media (max-width: 640px) {
  .asset-list-page { padding: var(--space-4); }
  .al-header { flex-direction: column; align-items: flex-start; }
  .al-toolbar { flex-direction: column; align-items: flex-start; }
  .al-search-wrap { max-width: 100%; width: 100%; }
}

/* ════════════════════════════════════════════════════
   ADDITIONS: new-row highlight, improved kebab,
              custom confirmation dialog
════════════════════════════════════════════════════ */

/* ── New-row flash animation ──────────────────── */
@keyframes al-row-flash {
  0%   { background: #fff4ed; }
  60%  { background: #fff4ed; }
  100% { background: transparent; }
}
.al-row-new {
  animation: al-row-flash 2s ease forwards;
}
.al-row-new td:first-child {
  position: relative;
}
.al-row-new td:first-child::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--brand-orange, #E8650A);
  border-radius: 0 2px 2px 0;
}

/* ── Kebab button (SVG dots, last col) ────────── */
.al-table th.al-kebab-col,
.al-table td.al-kebab-cell {
  width: 52px;
  text-align: center;
  padding-left: 8px;
  padding-right: 8px;
}
.al-kebab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: var(--radius-sm, 4px);
  color: var(--ink-faint, #9898AE);
  transition: background 0.12s, color 0.12s;
}
.al-kebab-btn:hover {
  background: var(--surface-raised, #EDEDF5);
  color: var(--ink, #1A1A2E);
}

/* ── Kebab menu items (SVG icons) ─────────────── */
.al-kebab-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.al-kebab-item svg {
  flex-shrink: 0;
  opacity: 0.7;
}
.al-kebab-item.danger svg { opacity: 1; }

/* ── Danger button ────────────────────────────── */
.al-btn-danger {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}
.al-btn-danger:hover { background: #dc2626; border-color: #dc2626; }

/* ── Confirmation dialog overlay ──────────────── */
.al-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 46, 0.45);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.al-confirm-overlay.open { opacity: 1; }

.al-confirm-box {
  background: var(--surface-card, #fff);
  border-radius: var(--radius-lg, 14px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  padding: 28px 28px 24px;
  max-width: 380px;
  width: 100%;
  transform: scale(0.94) translateY(8px);
  transition: transform 0.18s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
}
.al-confirm-overlay.open .al-confirm-box {
  transform: scale(1) translateY(0);
}

.al-confirm-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.al-confirm-icon--danger {
  background: #fef2f2;
  color: #ef4444;
}

.al-confirm-title {
  font-size: var(--text-base, 0.9375rem);
  font-weight: 700;
  color: var(--ink, #1A1A2E);
  margin-bottom: 8px;
  line-height: 1.4;
}

.al-confirm-body {
  font-size: var(--text-sm, 0.8125rem);
  color: var(--ink-muted, #5A5A72);
  line-height: 1.6;
  margin-bottom: 24px;
}

.al-confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  width: 100%;
}
.al-confirm-actions .al-btn {
  flex: 1;
  justify-content: center;
}
