/* Attendance Evidence v2 - isolated from the legacy HR presentation layer. */
.aev-root {
  --aev-bg: #08111f;
  --aev-panel: #0c1829;
  --aev-panel-2: #101e31;
  --aev-soft: #14243a;
  --aev-line: rgba(164, 185, 215, .14);
  --aev-line-strong: rgba(164, 185, 215, .24);
  --aev-text: #edf4ff;
  --aev-muted: #96a8c2;
  --aev-faint: #687b97;
  --aev-accent: #55c2a5;
  --aev-accent-soft: rgba(85, 194, 165, .12);
  --aev-blue: #6fa6ff;
  --aev-blue-soft: rgba(111, 166, 255, .12);
  --aev-warn: #f5bd62;
  --aev-warn-soft: rgba(245, 189, 98, .12);
  --aev-danger: #ff7c83;
  --aev-danger-soft: rgba(255, 124, 131, .12);
  color: var(--aev-text);
  font-family: "DM Sans", system-ui, sans-serif;
  max-width: 1640px;
}

html[data-theme="light"] .aev-root {
  --aev-bg: #f3f7fb;
  --aev-panel: #fff;
  --aev-panel-2: #f8fafc;
  --aev-soft: #eef3f8;
  --aev-line: rgba(35, 57, 84, .11);
  --aev-line-strong: rgba(35, 57, 84, .2);
  --aev-text: #102033;
  --aev-muted: #53677f;
  --aev-faint: #788a9e;
  --aev-accent: #14866f;
  --aev-accent-soft: rgba(20, 134, 111, .09);
  --aev-blue: #326dcc;
  --aev-blue-soft: rgba(50, 109, 204, .09);
  --aev-warn: #a96812;
  --aev-warn-soft: rgba(169, 104, 18, .09);
  --aev-danger: #c73c49;
  --aev-danger-soft: rgba(199, 60, 73, .09);
}

.aev-root *,
.aev-gallery-backdrop * { box-sizing: border-box; }

.aev-root h1,
.aev-root h2,
.aev-root h3,
.aev-root h4,
.aev-root p { margin: 0; }

.aev-hero {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(400px, 620px);
  gap: 28px;
  align-items: end;
  padding: 8px 0 24px;
}

.aev-eyebrow,
.aev-panel-kicker,
.aev-event-kicker {
  display: block;
  margin-bottom: 7px;
  color: var(--aev-accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.aev-hero h1 {
  color: var(--aev-text);
  font-family: "Outfit", system-ui, sans-serif;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 760;
  letter-spacing: -.035em;
  line-height: 1;
}

.aev-hero-copy > p {
  max-width: 670px;
  margin-top: 11px;
  color: var(--aev-muted);
  font-size: 14px;
  line-height: 1.55;
}

.aev-source-card {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  min-height: 74px;
  padding: 14px 16px;
  border: 1px solid var(--aev-line);
  border-radius: 15px;
  background: var(--aev-panel);
  box-shadow: 0 10px 35px rgba(0, 0, 0, .12);
}

.aev-source-dot {
  width: 10px;
  height: 10px;
  border: 2px solid var(--aev-faint);
  border-radius: 50%;
  background: transparent;
}

.aev-source-dot.connected { border-color: var(--aev-accent); background: var(--aev-accent); }
.aev-source-dot.error { border-color: var(--aev-danger); background: var(--aev-danger); }

.aev-source-copy { min-width: 0; }
.aev-source-copy strong { display: block; overflow: hidden; color: var(--aev-text); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.aev-source-copy span { display: block; overflow: hidden; margin-top: 3px; color: var(--aev-muted); font-size: 11px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }

.aev-source-state {
  padding: 5px 9px;
  border: 1px solid var(--aev-line);
  border-radius: 99px;
  color: var(--aev-muted);
  background: var(--aev-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  white-space: nowrap;
}

.aev-source-state.connected { border-color: rgba(85, 194, 165, .28); color: var(--aev-accent); background: var(--aev-accent-soft); }
.aev-source-state.error { border-color: rgba(255, 124, 131, .28); color: var(--aev-danger); background: var(--aev-danger-soft); }

.aev-guardrails {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.aev-guardrails span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--aev-line);
  border-radius: 99px;
  color: var(--aev-muted);
  background: color-mix(in srgb, var(--aev-panel) 86%, transparent);
  font-size: 10px;
  font-weight: 700;
}

.aev-guardrails svg,
.aev-button svg,
.aev-reference-delete svg,
.aev-chevron svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.aev-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.aev-stat {
  position: relative;
  min-height: 118px;
  overflow: hidden;
  padding: 17px 18px;
  border: 1px solid var(--aev-line);
  border-radius: 16px;
  background: var(--aev-panel);
}

.aev-stat::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: var(--aev-blue);
  opacity: .75;
}

.aev-stat:nth-child(2)::after { background: var(--aev-accent); }
.aev-stat-review::after { background: var(--aev-warn); }
.aev-stat:nth-child(4)::after { background: #a684ec; }
.aev-stat > span { display: block; color: var(--aev-muted); font-size: 11px; font-weight: 700; }
.aev-stat strong { display: block; margin: 8px 0 2px; color: var(--aev-text); font-family: "Outfit", system-ui, sans-serif; font-size: 29px; line-height: 1; }
.aev-stat small { color: var(--aev-faint); font-size: 10px; }

.aev-reference,
.aev-review {
  margin-bottom: 18px;
  border: 1px solid var(--aev-line);
  border-radius: 18px;
  background: var(--aev-panel);
  box-shadow: 0 12px 42px rgba(0, 0, 0, .1);
}

.aev-reference { padding: 20px; }
.aev-reference-head { display: flex; gap: 24px; align-items: flex-end; justify-content: space-between; }
.aev-reference-head h2,
.aev-review-head h2 { color: var(--aev-text); font-family: "Outfit", system-ui, sans-serif; font-size: 19px; line-height: 1.15; }
.aev-reference-head p { max-width: 650px; margin-top: 7px; color: var(--aev-muted); font-size: 12px; line-height: 1.5; }
.aev-reference-controls { display: flex; gap: 10px; align-items: flex-end; min-width: min(100%, 430px); }
.aev-reference-controls .aev-field { flex: 1; }

.aev-field { display: grid; gap: 6px; min-width: 0; }
.aev-field > span { color: var(--aev-muted); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }

.aev-control {
  width: 100%;
  height: 40px;
  min-width: 0;
  padding: 0 12px;
  border: 1px solid var(--aev-line-strong);
  border-radius: 10px;
  outline: none;
  color: var(--aev-text);
  background: var(--aev-panel-2);
  font: 600 12px/1 "DM Sans", system-ui, sans-serif;
  color-scheme: dark;
}

html[data-theme="light"] .aev-control { color-scheme: light; }
.aev-control:focus { border-color: var(--aev-accent); box-shadow: 0 0 0 3px var(--aev-accent-soft); }
.aev-control::placeholder { color: var(--aev-faint); }

.aev-button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--aev-line-strong);
  border-radius: 10px;
  color: var(--aev-text);
  background: var(--aev-panel-2);
  font: 750 12px/1 "DM Sans", system-ui, sans-serif;
  cursor: pointer;
}

.aev-button:hover { border-color: var(--aev-accent); background: var(--aev-soft); }
.aev-button:focus-visible { outline: 3px solid var(--aev-accent-soft); outline-offset: 2px; }
.aev-button:disabled { cursor: wait; opacity: .55; }
.aev-button-primary { border-color: transparent; color: #05130f; background: var(--aev-accent); white-space: nowrap; }
.aev-button-primary:hover { color: #05130f; background: color-mix(in srgb, var(--aev-accent) 84%, white); }
.face-reference-upload.is-busy { pointer-events: none; opacity: .6; }

.aev-reference-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.aev-reference-item { overflow: hidden; border: 1px solid var(--aev-line); border-radius: 13px; background: var(--aev-panel-2); }
.aev-reference-image { display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; color: var(--aev-faint); background: var(--aev-soft); font-size: 10px; }
.aev-reference-image img { width: 100%; height: 100%; object-fit: cover; }
.aev-reference-image.error { padding: 12px; color: var(--aev-danger); text-align: center; }
.aev-reference-meta { display: flex; gap: 8px; align-items: center; padding: 10px; }
.aev-reference-meta > div { min-width: 0; flex: 1; }
.aev-reference-meta strong,
.aev-reference-meta span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aev-reference-meta strong { color: var(--aev-text); font-size: 11px; }
.aev-reference-meta span { margin-top: 2px; color: var(--aev-faint); font-size: 9px; }
.aev-reference-delete { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border: 1px solid var(--aev-line); border-radius: 8px; color: var(--aev-muted); background: transparent; cursor: pointer; }
.aev-reference-delete:hover { border-color: var(--aev-danger); color: var(--aev-danger); background: var(--aev-danger-soft); }

.aev-review { overflow: hidden; }
.aev-review-head { display: flex; min-height: 72px; padding: 17px 20px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--aev-line); }
.aev-review-head .aev-panel-kicker { margin-bottom: 5px; }
.aev-busy-state { min-height: 18px; color: var(--aev-accent); font-size: 11px; font-weight: 700; }

.aev-toolbar {
  display: grid;
  grid-template-columns: minmax(155px, .75fr) minmax(180px, 1fr) minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 14px 20px;
  border-bottom: 1px solid var(--aev-line);
  background: var(--aev-panel-2);
}

.aev-button-refresh { min-width: 105px; }
.aev-list { display: grid; gap: 12px; min-height: 180px; padding: 16px; }
.aev-list.is-refreshing { opacity: .62; pointer-events: none; }

.aev-employee { overflow: hidden; border: 1px solid var(--aev-line); border-radius: 15px; background: var(--aev-panel-2); }
.aev-employee[open] { border-color: var(--aev-line-strong); }
.aev-employee-head { display: flex; gap: 18px; min-height: 78px; padding: 14px 16px; align-items: center; justify-content: space-between; list-style: none; cursor: pointer; user-select: none; }
.aev-employee-head::-webkit-details-marker { display: none; }
.aev-employee-head:hover { background: var(--aev-soft); }
.aev-employee-identity { display: flex; gap: 12px; min-width: 0; align-items: center; }
.aev-avatar { display: grid; width: 43px; height: 43px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(85, 194, 165, .28); border-radius: 13px; color: var(--aev-accent); background: var(--aev-accent-soft); font: 800 13px/1 "Outfit", system-ui, sans-serif; }
.aev-employee-identity h3 { overflow: hidden; color: var(--aev-text); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.aev-employee-identity p { margin-top: 3px; color: var(--aev-muted); font-size: 10px; }
.aev-employee-actions { display: flex; gap: 10px; align-items: center; }
.aev-private { padding: 5px 8px; border-radius: 7px; color: var(--aev-muted); background: var(--aev-soft); font-size: 9px; font-weight: 700; white-space: nowrap; }
.aev-chevron { display: grid; width: 30px; height: 30px; place-items: center; color: var(--aev-muted); }
.aev-employee[open] .aev-chevron { transform: rotate(180deg); }
.aev-employee-events { display: grid; gap: 1px; border-top: 1px solid var(--aev-line); background: var(--aev-line); }

.aev-event { padding: 18px; background: var(--aev-panel); }
.aev-event-head { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.aev-event-head h4 { color: var(--aev-text); font-family: "Outfit", system-ui, sans-serif; font-size: 15px; }
.aev-event-head p { margin-top: 4px; color: var(--aev-muted); font-size: 10px; }
.aev-match-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.aev-match { display: inline-flex; align-items: center; min-height: 24px; padding: 4px 8px; border: 1px solid var(--aev-line); border-radius: 7px; color: var(--aev-muted); background: var(--aev-soft); font-size: 9px; font-weight: 800; line-height: 1.2; }
.aev-match.suggested_match,
.aev-match.corroborates { border-color: rgba(85, 194, 165, .25); color: var(--aev-accent); background: var(--aev-accent-soft); }
.aev-match.face_not_matched,
.aev-match.contradicts,
.aev-match.processing_failed { border-color: rgba(255, 124, 131, .25); color: var(--aev-danger); background: var(--aev-danger-soft); }
.aev-match.no_face_detected,
.aev-match.background_faces_ignored,
.aev-match.inconclusive { border-color: rgba(245, 189, 98, .25); color: var(--aev-warn); background: var(--aev-warn-soft); }
.aev-match.score { color: var(--aev-blue); background: var(--aev-blue-soft); }

.aev-camera-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.aev-camera-card { overflow: hidden; border: 1px solid var(--aev-line); border-radius: 13px; background: var(--aev-panel-2); }
.aev-camera-frame { position: relative; display: grid; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; place-items: center; border: 0; border-bottom: 1px solid var(--aev-line); color: var(--aev-faint); background: #050a11; font: 700 10px/1.3 "DM Sans", system-ui, sans-serif; cursor: pointer; }
.aev-camera-frame img { width: 100%; height: 100%; object-fit: cover; }
.aev-camera-frame i { position: absolute; right: 8px; bottom: 8px; padding: 5px 7px; border-radius: 6px; color: #fff; background: rgba(5, 10, 17, .76); font-size: 9px; font-style: normal; opacity: 0; }
.aev-camera-frame:hover i,
.aev-camera-frame:focus-visible i { opacity: 1; }
.aev-camera-frame.error { padding: 14px; color: var(--aev-danger); cursor: default; }
.aev-camera-info { padding: 11px; }
.aev-camera-info > strong,
.aev-camera-info > span { display: block; }
.aev-camera-info > strong { color: var(--aev-text); font-size: 11px; }
.aev-camera-info > span { margin: 3px 0 8px; color: var(--aev-faint); font-size: 9px; }
.aev-reference-action { width: 100%; min-height: 31px; margin-top: 9px; border: 1px solid var(--aev-line); border-radius: 8px; color: var(--aev-muted); background: transparent; font: 750 10px/1 "DM Sans", system-ui, sans-serif; cursor: pointer; }
.aev-reference-action:hover { border-color: var(--aev-accent); color: var(--aev-accent); }
.aev-reference-action.active { border-color: rgba(85, 194, 165, .3); color: var(--aev-accent); background: var(--aev-accent-soft); }
.aev-reference-action:disabled { cursor: not-allowed; opacity: .58; }

.aev-review-form { display: grid; grid-template-columns: minmax(145px, .85fr) minmax(145px, .85fr) minmax(220px, 1.5fr) auto; gap: 10px; align-items: end; margin-top: 14px; padding: 14px; border: 1px solid var(--aev-line); border-radius: 13px; background: var(--aev-panel-2); }
.aev-review-title { grid-column: 1 / -1; display: flex; gap: 8px; align-items: baseline; }
.aev-review-title strong { color: var(--aev-text); font-size: 11px; }
.aev-review-title span { color: var(--aev-faint); font-size: 9px; }
.aev-review-notes { min-width: 0; }
.aev-save { border-color: transparent; color: #05130f; background: var(--aev-accent); }
.aev-save:hover { color: #05130f; background: color-mix(in srgb, var(--aev-accent) 84%, white); }

.aev-empty { display: grid; min-height: 130px; padding: 24px; place-content: center; color: var(--aev-muted); text-align: center; font-size: 11px; }
.aev-empty strong { color: var(--aev-text); font-size: 13px; }
.aev-empty span { margin-top: 4px; }
.aev-empty.compact { min-height: 64px; border: 1px dashed var(--aev-line); border-radius: 11px; }
.aev-empty.error { color: var(--aev-danger); }
.aev-skeleton { display: grid; grid-template-columns: 45px 1fr; grid-template-rows: 18px 13px; gap: 8px 12px; min-height: 78px; padding: 16px; border: 1px solid var(--aev-line); border-radius: 14px; background: var(--aev-panel-2); opacity: .72; }
.aev-skeleton i { grid-row: 1 / 3; width: 43px; height: 43px; border-radius: 12px; background: var(--aev-soft); }
.aev-skeleton span { max-width: 360px; border-radius: 5px; background: var(--aev-soft); }
.aev-skeleton span:last-child { max-width: 220px; }

/* Gallery is rendered outside .aev-root, so it receives its own isolated theme. */
.aev-gallery-backdrop {
  --aev-line: rgba(164, 185, 215, .14);
  --aev-muted: #96a8c2;
  --aev-soft: #14243a;
  --aev-accent: #55c2a5;
  --aev-accent-soft: rgba(85, 194, 165, .12);
  --aev-blue: #6fa6ff;
  --aev-blue-soft: rgba(111, 166, 255, .12);
  --aev-warn: #f5bd62;
  --aev-warn-soft: rgba(245, 189, 98, .12);
  --aev-danger: #ff7c83;
  --aev-danger-soft: rgba(255, 124, 131, .12);
  padding: 24px;
  background: rgba(2, 7, 13, .82);
  backdrop-filter: blur(10px);
}
.aev-gallery-modal { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; width: min(1180px, 96vw); max-height: min(900px, 92vh); overflow: hidden; border: 1px solid rgba(164, 185, 215, .2); border-radius: 18px; color: #edf4ff; background: #0c1829; box-shadow: 0 30px 90px rgba(0, 0, 0, .55); }
.aev-gallery-head { display: flex; gap: 20px; min-height: 86px; padding: 18px 20px; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(164, 185, 215, .14); }
.aev-gallery-head span { color: #55c2a5; font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.aev-gallery-head h2 { margin: 3px 0 2px; font: 750 18px/1.2 "Outfit", system-ui, sans-serif; }
.aev-gallery-head p { color: #96a8c2; font-size: 10px; }
.aev-gallery-close { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(164, 185, 215, .18); border-radius: 10px; color: #96a8c2; background: #101e31; cursor: pointer; }
.aev-gallery-close:hover { border-color: #ff7c83; color: #ff7c83; }
.aev-gallery-body { min-height: 0; overflow: auto; padding: 16px; }
.aev-gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.aev-gallery-card { overflow: hidden; border: 1px solid rgba(164, 185, 215, .14); border-radius: 14px; background: #101e31; }
.aev-gallery-frame { position: relative; display: grid; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; padding: 0; place-items: center; border: 0; color: #687b97; background: #050a11; font: 700 10px/1.4 "DM Sans", system-ui, sans-serif; cursor: zoom-in; touch-action: pan-x pan-y; }
.aev-gallery-frame img { width: 100%; height: 100%; object-fit: contain; user-select: none; transition: width .18s ease; }
.aev-gallery-frame i { position: absolute; right: 10px; bottom: 10px; z-index: 2; padding: 6px 8px; border-radius: 7px; color: #fff; background: rgba(5,10,17,.78); font-size: 9px; font-style: normal; pointer-events: none; }
.aev-gallery-frame.is-zoomed { display: block; overflow: auto; cursor: zoom-out; }
.aev-gallery-frame.is-zoomed img { width: 250%; height: auto; max-width: none; object-fit: initial; }
.aev-gallery-frame.error { padding: 20px; color: #ff7c83; text-align: center; }
.aev-gallery-info { padding: 13px; }
.aev-gallery-title { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.aev-gallery-title strong { font-size: 12px; }
.aev-gallery-badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.aev-auto-camera { display: inline-flex; min-height: 22px; padding: 5px 8px; align-items: center; border: 1px solid rgba(111,166,255,.28); border-radius: 999px; color: #9bc0ff; background: rgba(111,166,255,.12); font-size: 9px; font-weight: 800; line-height: 1; }
.aev-auto-camera.recognized { border-color: rgba(85,194,165,.34); color: #7cdec4; background: rgba(85,194,165,.12); }
.aev-camera-card.is-auto-camera { border-color: rgba(111,166,255,.46); box-shadow: 0 0 0 1px rgba(111,166,255,.15); }
.aev-gallery-info p { margin: 6px 0 0; color: #96a8c2; font-size: 10px; line-height: 1.5; }
.aev-gallery-foot { display: flex; gap: 18px; min-height: 64px; padding: 12px 20px; align-items: center; justify-content: space-between; border-top: 1px solid rgba(164, 185, 215, .14); color: #96a8c2; font-size: 10px; }
.aev-gallery-foot .aev-button { border-color: rgba(164, 185, 215, .2); color: #edf4ff; background: #101e31; }

@media (max-width: 1100px) {
  .aev-hero { grid-template-columns: 1fr; align-items: start; }
  .aev-source-card { max-width: none; }
  .aev-review-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aev-review-title { grid-column: 1 / -1; }
  .aev-save { align-self: end; }
}

@media (max-width: 760px) {
  .aev-root { padding-right: 14px !important; padding-left: 14px !important; }
  .aev-hero { gap: 18px; padding-top: 0; }
  .aev-source-card { grid-template-columns: 10px minmax(0, 1fr); }
  .aev-source-state { grid-column: 2; justify-self: start; }
  .aev-source-copy span { overflow: visible; white-space: normal; }
  .aev-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aev-stat { min-height: 102px; }
  .aev-reference { padding: 16px; }
  .aev-reference-head { display: grid; }
  .aev-reference-controls { width: 100%; min-width: 0; }
  .aev-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px; }
  .aev-button-refresh { width: 100%; }
  .aev-review-head { padding: 15px; }
  .aev-list { padding: 10px; }
  .aev-employee-head { gap: 10px; padding: 12px; }
  .aev-private { display: none; }
  .aev-event { padding: 14px; }
  .aev-event-head { display: grid; gap: 10px; }
  .aev-camera-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aev-review-form { grid-template-columns: 1fr; }
  .aev-review-title { display: grid; grid-column: auto; }
  .aev-gallery-backdrop { padding: 10px; }
  .aev-gallery-modal { width: 100%; max-height: 96vh; }
  .aev-gallery-grid { grid-template-columns: 1fr; }
  .aev-gallery-foot span { max-width: 60%; }
}

@media (max-width: 480px) {
  .aev-stats { gap: 8px; }
  .aev-stat { min-height: 94px; padding: 14px; }
  .aev-stat strong { font-size: 24px; }
  .aev-guardrails span:first-child { flex-basis: 100%; justify-content: center; }
  .aev-reference-controls { display: grid; }
  .aev-reference-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aev-toolbar { grid-template-columns: 1fr; }
  .aev-camera-grid { grid-template-columns: 1fr; }
  .aev-avatar { width: 39px; height: 39px; }
  .aev-employee-identity p { white-space: normal; }
  .aev-gallery-head { padding: 14px; }
  .aev-gallery-head p { display: none; }
  .aev-gallery-body { padding: 10px; }
  .aev-gallery-foot { padding: 10px 14px; }
  .aev-gallery-foot span { display: none; }
  .aev-gallery-foot .aev-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .aev-root *,
  .aev-gallery-backdrop * { scroll-behavior: auto !important; }
}
