/* ── APPROVALS PAGE ────────────────────────────────────────────────── */

.approval-count-badge {
  background: var(--vms-red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 5px;
  vertical-align: middle;
}

/* ── FILTER BAR ────────────────────────────────────────────────────── */
.ap-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.ap-search-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0.9;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0 10px;
  height: 34px;
}
.ap-search-icon { color: var(--text-dim); flex-shrink: 0; }
.ap-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 12px;
  color: var(--text);
  outline: none;
  font-family: inherit;
}
.ap-search-input::placeholder { color: var(--text-dim); }
.ap-date-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0 10px;
  height: 34px;
  color: var(--text-dim);
}
.ap-date-input {
  border: none;
  background: transparent;
  font-size: 12px;
  color: var(--text);
  outline: none;
  font-family: inherit;
  width: 118px;
  cursor: pointer;
}
.ap-date-sep { font-size: 12px; color: var(--text-dim); }
.ap-clear-btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.ap-clear-btn:hover { background: var(--surface2); color: var(--text); }

/* ── PENDING GRID ──────────────────────────────────────────────────── */
.ap-pending-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: start;
}

/* ── CARD ──────────────────────────────────────────────────────────── */
.ap-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.05);
  transition: box-shadow .2s, transform .2s;
}
.ap-card:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.07);
  transform: translateY(-2px);
}

/* ── CARD HERO — full-width colored top ────────────────────────────── */
.ap-card-hero {
  position: relative;
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
}
.ap-card.risk-low    .ap-card-hero { background: linear-gradient(150deg, #1e3a8a 0%, #2563eb 100%); }
.ap-card.risk-medium .ap-card-hero { background: linear-gradient(150deg, #78350f 0%, #c97d10 100%); }
.ap-card.risk-high   .ap-card-hero { background: linear-gradient(150deg, #7f1d1d 0%, #dc2626 100%); }

.ap-hero-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* risk pill on hero */
.ap-risk-pill {
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: rgba(255,255,255,.18);
  color: #fff;
  border: 1px solid rgba(255,255,255,.28);
}
.ap-card.risk-high .ap-risk-pill { background: rgba(255,255,255,.12); }

/* view link on hero */
.ap-view-link-hero {
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(255,255,255,.8);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  transition: color .12s;
}
.ap-view-link-hero:hover { color: #fff; }

/* large circular photo */
.ap-hero-photo {
  width: 76px; height: 76px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  border: 3px solid rgba(255,255,255,.45);
  box-shadow: 0 4px 18px rgba(0,0,0,.28);
  transition: transform .16s, border-color .16s;
}
.ap-hero-photo:hover { transform: scale(1.06); border-color: rgba(255,255,255,.85); }
.ap-hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* name + email + chips on hero */
.ap-hero-id { text-align: center; width: 100%; }
.ap-name  { font-size: 14px; font-weight: 700; color: #fff; }
.ap-email { font-size: 10.5px; color: rgba(255,255,255,.7); margin-top: 2px; }

/* company + host chips */
.ap-card-chips { display: flex; gap: 5px; justify-content: center; margin-top: 8px; flex-wrap: wrap; }
.ap-chip {
  font-size: 10px; font-weight: 600;
  padding: 3px 8px; border-radius: 5px;
  background: rgba(255,255,255,.15);
  color: rgba(255,255,255,.9);
  border: 1px solid rgba(255,255,255,.22);
}

/* ── INFO GRID ─────────────────────────────────────────────────────── */
.ap-info-grid {
  border-top: 1px solid var(--border);
  padding: 4px 14px 2px;
}
.ap-info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 5px 0;
  border-bottom: 1px solid var(--border-subtle, rgba(0,0,0,.05));
  gap: 8px;
}
[data-theme="dark"] .ap-info-row { border-bottom-color: rgba(255,255,255,.05); }
.ap-info-row:last-child { border-bottom: none; }
.ap-info-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-dim); flex-shrink: 0;
}
.ap-info-value { font-size: 11.5px; color: var(--text); text-align: right; }
.ap-slot-inline { color: var(--accent); font-weight: 600; }

/* ── ACTIONS ────────────────────────────────────────────────────────── */
.ap-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 10px 14px 14px;
}
.ap-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 5px; padding: 7px 10px; border-radius: 8px;
  font-size: 11.5px; font-weight: 600; cursor: pointer;
  border: 1.5px solid transparent; background: transparent;
  transition: background .14s, border-color .14s, color .14s, transform .1s;
  white-space: nowrap; font-family: inherit;
}
.ap-btn:active { transform: scale(.97); }

.ap-btn-approve {
  grid-column: 1 / -1;
  color: #fff;
  background: #16a34a;
  border-color: #15803d;
  box-shadow: 0 2px 8px rgba(22,163,74,.3);
  font-size: 12px;
  padding: 8px 10px;
}
.ap-btn-approve:hover { background: #15803d; box-shadow: 0 3px 12px rgba(22,163,74,.4); }

.ap-btn-reject {
  color: #dc2626;
  border-color: rgba(220,38,38,.35);
  background: rgba(220,38,38,.06);
}
.ap-btn-reject:hover { background: rgba(220,38,38,.14); border-color: rgba(220,38,38,.6); }

.ap-btn-reschedule {
  color: var(--text-muted);
  border-color: var(--border);
}
.ap-btn-reschedule:hover { background: var(--surface2); color: var(--text); }

/* backward compat — keep ap-view-link for modals */
.ap-view-link {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 500; color: var(--accent);
  text-decoration: none; cursor: pointer;
}
.ap-view-link:hover { text-decoration: underline; }

/* ── APPROVED / REJECTED LIST ──────────────────────────────────────── */
.ap-list { display: flex; flex-direction: column; gap: 10px; }
.ap-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}
.ap-list-avatar {
  width: 36px;
  height: 36px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}
.ap-list-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ap-list-body { flex: 1; min-width: 0; }
.ap-list-name { font-size: 13px; font-weight: 600; color: var(--text); }
.ap-list-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.ap-list-slot {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
}
.ap-slot-time {
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
}
.ap-slot-sep { font-size: 10px; color: var(--text-dim); }
.ap-slot-pass {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  padding: 1px 7px;
  border-radius: 10px;
}
.ap-list-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.ap-list-time { font-size: 11px; color: var(--text-dim); }

@media (max-width: 1199px) {
  .ap-pending-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 991px) {
  .ap-pending-grid { grid-template-columns: repeat(2, 1fr); }
  .ap-filter-bar   { flex-wrap: wrap; gap: 8px; }
}
@media (max-width: 767px) {
  .ap-pending-grid { grid-template-columns: 1fr; }
  .ap-info-row     { grid-template-columns: 110px 1fr; }
  .ap-info-label   { margin-left: 0; }
  .ap-filter-bar   { flex-direction: column; align-items: stretch; }
  .ap-search-wrap  { flex: 1; min-width: 0; }
  .ap-date-wrap    { flex: 1; }
}
@media (max-width: 575px) {
  .ap-pending-grid { grid-template-columns: 1fr; }
  .ap-btn          { font-size: 10px; padding: 5px 8px; min-height: 36px; }
  .ap-info-row     { grid-template-columns: 80px 1fr; }
  .ap-info-label   { margin-left: 0; }
  .ap-list-item    { flex-wrap: wrap; gap: 8px; }
  .ap-list-right   { width: 100%; flex-direction: row; justify-content: space-between; align-items: center; }
}
@media (max-width: 479px) {
  .ap-pending-grid { grid-template-columns: 1fr; gap: 8px; }
  .ap-info-row     { grid-template-columns: 70px 1fr; }
}
