/* Customer workspace shares the administration portal's visual language. */
.account-page {
  --paper: #090b0f;
  --sage: #12161d;
  --ink: #f5f6fa;
  --muted: #a2a9b7;
  --line: #2a303b;
  --lime: #ff485b;
  background: var(--paper);
  font-size: 15px;
  line-height: 1.5;
}
.account-page button, .account-page input, .account-page select { font: inherit; }
.account-page h2 { font-size: 22px; letter-spacing: -.5px; }
.account-page .eyebrow { color: var(--lime); font-size: 10px; letter-spacing: 2px; margin: 0 0 12px; }
.account-page .auth-preview .eyebrow { color: var(--lime); }
.account-page button.primary, .account-page a.primary {
  background: var(--lime); color: #140609; border: 1px solid var(--lime);
  border-radius: 10px; padding: 11px 17px; box-shadow: none; font-weight: 750;
}
.account-page button.primary:hover { transform: none; filter: brightness(1.1); box-shadow: none; }
.account-page .secondary {
  border: 1px solid var(--line); background: #191e27; color: var(--ink);
  border-radius: 10px; padding: 11px 17px; text-decoration: none;
}
.account-page .secondary:hover { background: #242b37; }
.account-page .danger { border-radius: 10px; padding: 11px 17px; }
.account-page .card { background: var(--sage); border: 1px solid var(--line); border-radius: 15px; }
.account-page input, .account-page select {
  background: #0c0f15; border: 1px solid var(--line); border-radius: 9px;
  color: var(--ink); padding: 12px 13px;
}
.account-page input:focus, .account-page select:focus { border-color: var(--lime); }
.account-page input[type=checkbox] { padding: 0; }
.account-page input[type=range] { padding: 0; }
.account-page:not(.signed-in) .account-topbar { max-width: 1200px; border: 0; padding: 35px 0; }
.account-page:not(.signed-in) .dashboard-page { max-width: 1110px; padding: 45px 0 70px; }
.account-page .auth-layout { grid-template-columns: 1.2fr 1fr; gap: 85px; }
.account-page .auth-preview h2 { font-size: 60px; line-height: 1.03; letter-spacing: -3px; margin: 18px 0 25px; }
.account-page .auth-preview > p:last-child { max-width: 440px; font-size: 17px; }
.account-page .auth-preview .room { max-width: 440px; border: 1px solid var(--line); border-radius: 18px; }
.account-page #auth { max-width: 480px; padding: 36px; border-radius: 22px; }
.account-page #form-title { font-size: 30px; letter-spacing: -1px; }
.account-page #auth .fine { font-size: 12px; line-height: 1.65; }
.account-page #account-form label { font-size: 13px; }
.account-page #account-form > .row { margin-top: 18px; }
.account-page #switch { font-size: 13px; }
.account-page #verify, .account-page #forgot, .account-page #resend { background: transparent; }
.account-page #status { background: transparent; border: 0; padding: 0; font-size: 13px; }
.account-page #status.error { padding: 12px 16px; border: 1px solid #ff485b44; }
.account-page.signed-in .account-topbar { display: none; }
.account-page.signed-in .dashboard-page.wrap { width: 100%; max-width: none; padding: 0; }
.account-page.signed-in #dashboard { display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 0; min-height: 100dvh; }
.customer-sidebar {
  position: sticky; top: 0; height: 100dvh; padding: 35px 25px;
  display: flex; flex-direction: column; border-right: 1px solid var(--line); background: #0d1016;
}
.customer-sidebar .brand { gap: 8px; font-size: 29px; letter-spacing: -1.7px; flex-wrap: wrap; }
.customer-sidebar .brand img { width: 27px; height: 30px; }
.workspace-badge { font-size: 8px; letter-spacing: 1.1px; font-weight: 500; border: 1px solid var(--line); border-radius: 5px; padding: 3px 5px; color: var(--muted); }
.side-caption { font-size: 10px; letter-spacing: 1.5px; color: #747d8f; margin: 55px 0 15px; }
.customer-sidebar .console-nav { position: static; display: grid; gap: 7px; padding: 0; background: transparent; border: 0; box-shadow: none; }
.customer-sidebar .console-nav button { padding: 14px 15px; font-weight: 500; border-radius: 10px; font-size: 14px; gap: 14px; }
.customer-sidebar .console-nav svg { width: 18px; height: 18px; }
.customer-sidebar .console-nav button[aria-selected=true] { background: #ff485b15; color: var(--lime); }
.customer-sidebar-bottom { margin-top: auto; padding-top: 30px; display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.customer-sidebar-bottom .side-caption { margin: 0; }
.customer-sidebar-bottom strong { font-size: 12px; overflow-wrap: anywhere; max-width: 100%; }
.workspace-quiet { padding: 5px 0; background: transparent; border: 0; color: var(--muted); font-size: 13px !important; }
.workspace-quiet:hover, .workspace-help a:hover { color: var(--ink); }
.workspace-help { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 14px; font-size: 11px; color: var(--muted); }
.workspace-help a { text-decoration: none; }
.console-content { width: 100%; max-width: 1600px; margin: 0 auto; padding: 44px 45px; min-width: 0; }
.console-content .console-heading { margin-bottom: 40px; align-items: center; gap: 25px; }
.console-content .console-heading h1 { font-size: 38px; line-height: 1.1; letter-spacing: -1.5px; margin: 0 0 12px; }
.console-content .console-heading p:not(.eyebrow) { margin: 0; font-size: 15px; }
.console-content .console-heading .eyebrow { color: var(--lime); }
.console-content #refresh { white-space: nowrap; min-height: 46px; }
.console-content > #status:not([hidden]) { margin: 0 0 24px; }
.account-page.signed-in .stats-grid { gap: 15px; margin: 8px 0 30px; }
.account-page.signed-in .stat-card { background: var(--sage); border-radius: 15px; padding: 23px; min-height: 138px; }
.account-page.signed-in .stat-card strong { font-size: 35px; font-weight: 750; margin-bottom: 10px; }
.account-page.signed-in .stat-card span { font-size: 12px; }
.console-content .section-toolbar { margin: 0 0 20px; }
.console-content .section-toolbar h2 { font-size: 22px; letter-spacing: -.5px; }
.account-page.signed-in .events-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.account-page.signed-in .event-row { background: var(--sage); border: 1px solid var(--line); border-radius: 15px; padding: 16px; min-height: 116px; gap: 16px; }
.account-page.signed-in .event-row:hover { background: #191e27; border-color: #47505f; }
.account-page.signed-in .event-row img { width: 110px; height: 80px; border-radius: 9px; }
.account-page.signed-in .event-row > span:nth-child(2) { min-width: 0; overflow-wrap: anywhere; }
.account-page.signed-in .event-row strong { font-size: 14px; }
.account-page.signed-in .event-row small { font-size: 11px; line-height: 1.6; }
.account-page.signed-in .device-list { background: var(--sage); border-radius: 15px; }
.account-page.signed-in .device-item { padding: 23px; }
.console-content .account-settings-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.console-content #account-email { overflow-wrap: anywhere; }
.console-content .account-settings-grid .card { margin: 0; padding: 26px; }
.console-content .account-settings-grid .account-delete { grid-column: 1 / -1; }
.console-content .wall-toolbar { margin-bottom: 24px; }
.console-content .talk-panel { background: #191e27f5; border-color: var(--line); border-radius: 15px; }
.customer-footer { display: flex; justify-content: space-between; gap: 20px; font-size: 11px; color: #778092; margin-top: 50px; }
.customer-footer a { text-decoration: none; }
.account-page dialog { background: #10141c; border: 1px solid #343c4a; border-radius: 20px; padding: 30px; }
/* Video wall fills the available workspace and retains live player nodes when arranged. */
.account-page.viewing-wall .console-content { max-width: none; }
.account-page.viewing-wall .console-content { padding: 20px 24px; }
.account-page.viewing-wall .console-heading { margin-bottom: 14px; }
.account-page.viewing-wall .console-heading h1 { font-size: 26px; margin: 0; }
.account-page.viewing-wall .console-heading .eyebrow,
.account-page.viewing-wall .console-heading #console-subtitle,
.account-page.viewing-wall .customer-footer { display: none; }
.account-page.viewing-wall #refresh { min-height: 36px; padding: 8px 12px; font-size: 12px; }
.account-page.viewing-wall .wall-toolbar { align-items: center; gap: 15px; }
.account-page.viewing-wall .wall-toolbar > p { max-width: 220px; font-size: 11px; }
.account-page.viewing-wall .wall-toolbar .row { flex-wrap: wrap; justify-content: flex-end; }
.account-page.viewing-wall .wall-toolbar .secondary { padding: 9px 12px; font-size: 12px; }
.wall-layout-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.account-page .wall-layout-label select { padding: 9px 12px; max-width: 130px; font-size: 12px; }
.account-page.signed-in #camera-wall.wall-has-cameras {
  grid-template-columns: repeat(var(--wall-columns,2),minmax(0,1fr));
  grid-template-rows: repeat(var(--wall-rows,2),minmax(120px,1fr));
  height: var(--wall-height,65vh); gap: 15px;
}
.account-page.signed-in #camera-wall.wall-has-cameras .wall-tile { min-height: 0; height: 100%; }
.account-page.signed-in #camera-wall.wall-has-cameras .wall-video { height: 100%; aspect-ratio: auto; }
.account-page.signed-in #camera-wall.wall-fill-picture .wall-video video { object-fit: cover; }
.account-page.viewing-wall .talk-panel { position: static; padding: 12px 16px; }
.account-page.viewing-wall .talk-panel .control-note { font-size: 10px; margin-top: 7px; }
.account-page.viewing-wall #wall-stream-area > #wall-controls { display: grid; grid-template-columns: minmax(140px,auto) 1fr; gap: 5px 16px; align-items: center; }
.account-page.viewing-wall #wall-stream-area > #wall-controls .control-heading { flex-direction: column; align-items: flex-start; gap: 3px; }
.account-page.viewing-wall #wall-stream-area > #wall-controls .controls { margin: 0; }
.account-page.viewing-wall #wall-stream-area > #wall-controls .control-note { grid-column: 1 / -1; margin: 3px 0 0; }
.account-page.viewing-wall #wall-stream-area > #wall-controls { margin-bottom: 14px; }
.account-page .wall-options { padding: 0; border: 0; position: relative; }
.wall-options > summary { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #191e27; font-size: 12px; font-weight: 500; }
.wall-options-content { position: absolute; top: calc(100% + 8px); right: 0; z-index: 12; width: 320px; max-width: calc(100vw - 36px); border: 1px solid #485164; border-radius: 15px; padding: 18px; background: #12161dfc; box-shadow: 0 15px 45px #0008; display: grid; gap: 14px; }
.wall-options-content .wall-layout-label { justify-content: space-between; }
.account-page .wall-options-content .wall-layout-label select { max-width: 190px; }
.wall-options-content .row { margin: 4px 0 0; }
.wall-hide-camera { position: absolute; top: 9px; right: 9px; z-index: 5; border: 1px solid #ffffff35; background: #10141ce8; color: #d0d5e1; border-radius: 8px; width: 29px; height: 29px; line-height: 1; padding: 0; font-size: 21px !important; }
.wall-hide-camera:hover { color: white; background: #ff485b44; }
.account-page.signed-in .wall-tile-header { padding-right: 47px; }
.wall-arranging .wall-tile { touch-action: pan-y; }
.account-page.signed-in .camera-select { cursor: grab; }
.account-page.signed-in .camera-select:active { cursor: grabbing; }
.wall-hidden-camera { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px; background: var(--sage); border-bottom: 1px solid var(--line); }
.wall-hidden-camera strong { overflow-wrap: anywhere; }
.wall-camera-choice-label { display: flex; flex-direction: column; gap: 5px; }
.wall-hidden-camera .secondary { flex-shrink: 0; }
.sidebar-collapse { margin-top: 22px; font-size: 13px; text-align: left; }
.wall-workspace { display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 16px; align-items: start; }
.wall-stream-area { min-width: 0; }
.wall-camera-browser { padding: 16px; background: var(--sage); border: 1px solid var(--line); border-radius: 15px; max-height: calc(100dvh - 160px); overflow: auto; }
.wall-camera-browser h2 { font-size: 15px; margin: 0 0 5px; }
.wall-camera-browser > p { font-size: 10px; margin: 0 0 10px; }
.wall-camera-browser .wall-hidden-camera { padding: 12px 0; gap: 8px; background: transparent; }
.wall-camera-browser .wall-camera-choice-label { min-width: 0; gap: 3px; }
.wall-camera-browser strong { font-size: 12px; }
.wall-camera-browser small { font-size: 10px; }
.wall-camera-browser .secondary { width: 30px; height: 30px; font-size: 19px; padding: 0; }
.wall-camera-connection { font-size: 10px; }
.wall-camera-connection.is-online { color: #66d7ad; }
.wall-camera-connection.is-offline { color: var(--muted); }
.viewing-wall .customer-sidebar > .side-caption { margin: 16px 0 10px; }
.viewing-wall .customer-sidebar .console-nav button { padding-top: 10px; padding-bottom: 10px; }
.viewing-wall .customer-sidebar-bottom { margin-top: 16px; padding-top: 10px; gap: 6px; }
.viewing-wall .customer-sidebar .sidebar-collapse { margin-top: 12px; }
.wall-zoom-controls { position: absolute; bottom: 10px; left: 10px; display: flex; align-items: center; gap: 5px; background: #0c0f15e8; border: 1px solid #ffffff30; border-radius: 9px; padding: 4px; z-index: 4; color: var(--ink); }
.wall-zoom-controls button { width: 28px; height: 28px; font-size: 18px; border: 0; border-radius: 6px; background: #252e3c; color: var(--ink); padding: 0; }
.wall-zoom-controls button:last-child { width: auto; padding: 0 7px; font-size: 10px; }
.wall-zoom-controls output { font-size: 11px; min-width: 31px; text-align: center; }
.wall-zoomed .camera-select { cursor: move !important; touch-action: none; }
.expanded-camera .wall-zoom-controls { bottom: 16px; left: 16px; }
.expanded-camera .wall-zoom-controls button { height: 36px; min-width: 36px; }
.expanded-camera .wall-video video { transform-origin: center; }
.account-page .expanded-camera .camera-select { display: block; }
@media (min-width: 751px) {
  .account-page.sidebar-collapsed.signed-in #dashboard { grid-template-columns: 74px minmax(0,1fr); }
  .sidebar-collapsed .customer-sidebar { padding: 25px 12px; }
  .sidebar-collapsed .customer-sidebar .brand { font-size: 0; justify-content: center; gap: 0; }
  .sidebar-collapsed .customer-sidebar .workspace-badge,
  .sidebar-collapsed .customer-sidebar .side-caption,
  .sidebar-collapsed .customer-sidebar .console-nav span,
  .sidebar-collapsed .customer-sidebar-bottom strong,
  .sidebar-collapsed .customer-sidebar-bottom .fine,
  .sidebar-collapsed .customer-sidebar-bottom .workspace-help,
  .sidebar-collapsed .sidebar-collapse span { display: none; }
  .sidebar-collapsed .sidebar-collapse { text-align: center; font-size: 24px !important; margin-top: 20px; }
  .sidebar-collapsed .customer-sidebar .console-nav { margin-top: 20px; }
  .sidebar-collapsed .customer-sidebar .console-nav button { padding: 14px; justify-content: center; }
  .sidebar-collapsed #workspace-logout { font-size: 0 !important; }
  .sidebar-collapsed #workspace-logout::before { content: '↗'; font-size: 22px; }
  .sidebar-collapsed .customer-sidebar-bottom { align-items: center; }
}
.wall-order-tools { display: none; position: absolute; top: 45px; right: 12px; z-index: 5; gap: 5px; padding: 5px; background: #0c0f15e8; border: 1px solid #485164; border-radius: 10px; }
.wall-arranging .wall-order-tools { display: flex; }
.wall-order-tools button { background: #252e3c; color: var(--ink); border: 1px solid #485164; border-radius: 7px; width: 36px; height: 36px; padding: 0; font-size: 20px; }
.wall-order-tools .wall-drag-handle { cursor: grab; touch-action: none; user-select: none; font-size: 25px; }
.wall-order-tools .wall-drag-handle:active { cursor: grabbing; }
.wall-arranging .wall-tile { outline: 0; outline-offset: -3px; }
.wall-arranging .wall-tile.wall-dragging { outline: 3px solid var(--lime); opacity: .75; }
.wall-arranging .camera-select { cursor: default; }
.account-page #wall-arrange[aria-pressed=true] { background: #ff485b20; border-color: var(--lime); color: var(--lime); }
.account-page #panel-wall:fullscreen { padding: 20px; overflow: auto; background: var(--paper); }
.account-page #panel-wall:fullscreen .wall-toolbar { margin-bottom: 16px; }
.account-page #panel-wall:fullscreen .talk-panel { position: static; }
@media (max-width: 1100px) {
  .account-page.signed-in #dashboard { grid-template-columns: 210px minmax(0,1fr); }
  .customer-sidebar { padding: 30px 18px; }
  .workspace-badge { display: none; }
  .console-content { padding: 35px 25px; }
  .account-page.signed-in .events-grid { grid-template-columns: 1fr; }
  .account-page .auth-layout { gap: 50px; }
  .account-page .auth-preview h2 { font-size: 50px; }
}
@media (max-width: 750px) {
  .account-page.signed-in #dashboard { display: block; }
  .customer-sidebar { position: static; height: auto; padding: 18px; border-right: 0; border-bottom: 1px solid var(--line); }
  .customer-sidebar .brand { font-size: 25px; }
  .workspace-badge { display: inline; }
  .customer-sidebar > .side-caption { display: none; }
  .sidebar-collapse { display: none; }
  .wall-workspace { grid-template-columns: minmax(0,1fr); }
  .wall-camera-browser { padding: 14px; max-height: none; }
  .wall-camera-browser #wall-hidden-cameras { display: flex; gap: 16px; overflow-x: auto; }
  .wall-camera-browser .wall-hidden-camera { flex: 0 0 155px; border-bottom: 0; padding: 8px 0; }
  .wall-zoom-controls button { min-width: 32px; height: 32px; }
  .customer-sidebar .console-nav {
    position: static; inset: auto; display: flex; gap: 5px; overflow-x: auto;
    border-radius: 0; margin-top: 18px; backdrop-filter: none;
  }
  .customer-sidebar .console-nav button { flex: 0 0 auto; flex-direction: row; white-space: nowrap; padding: 10px; font-size: 12px; gap: 7px; }
  .customer-sidebar .console-nav svg { width: 16px; height: 16px; }
  .customer-sidebar-bottom { padding-top: 16px; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 10px; }
  .customer-sidebar-bottom .side-caption, .customer-sidebar-bottom .workspace-help { display: none; }
  .customer-sidebar-bottom strong { margin-right: auto; }
  .customer-sidebar-bottom #workspace-plan { font-size: 11px; }
  .console-content { padding: 25px 18px; }
  .console-content .console-heading { margin: 0 0 28px; align-items: flex-start; gap: 16px; }
  .console-content .console-heading h1 { font-size: 31px; }
  .console-content .console-heading p:not(.eyebrow) { font-size: 13px; }
  .console-content .console-heading .eyebrow { font-size: 9px; }
  .console-content #refresh { padding: 9px 12px; font-size: 12px; min-height: 42px; }
  .account-page.signed-in .stats-grid { gap: 10px; margin: 0 0 26px; }
  .account-page.signed-in .stat-card { padding: 16px 12px; min-height: 107px; }
  .account-page.signed-in .stat-card strong { font-size: 30px; }
  .account-page.signed-in .stat-card span { font-size: 11px; }
  .console-content .section-toolbar h2 { font-size: 20px; }
  .account-page.signed-in .event-row { padding: 12px; gap: 12px; min-height: 103px; }
  .account-page.signed-in .event-row img { width: 80px; height: 76px; }
  .account-page.signed-in .device-item { padding: 18px; }
  .console-content .account-settings-grid { grid-template-columns: minmax(0,1fr); }
  .console-content .account-settings-grid .card { padding: 22px; }
  .account-page.signed-in .talk-panel { bottom: 12px; }
  .account-page.signed-in #camera-wall.wall-has-cameras { height: auto; grid-template-rows: none; }
  .account-page.signed-in #camera-wall.wall-has-cameras .wall-video { aspect-ratio: 16 / 9; height: auto; }
  .account-page.viewing-wall .wall-toolbar .row { justify-content: flex-start; gap: 8px; }
  .account-page.viewing-wall .console-content { padding: 18px; }
  .account-page.viewing-wall #wall-stream-area > #wall-controls { grid-template-columns: 1fr; gap: 10px; }
  .account-page.viewing-wall .wall-toolbar .secondary { font-size: 12px; padding: 9px 12px; }
  .account-page:not(.signed-in) .account-topbar { padding: 25px 0; }
  .account-page .account-topbar .public-help { order: initial; width: auto; }
  .account-page:not(.signed-in) .dashboard-page { padding: 25px 0 50px; }
  .account-page .auth-layout { display: block; max-width: 500px; margin: auto; }
  .account-page .auth-preview { display: block; }
  .account-page .auth-preview h2 { font-size: 40px; letter-spacing: -1.5px; }
  .account-page .auth-preview .room { display: none; }
  .account-page .auth-preview > p:last-child { font-size: 15px; }
  .account-page #auth { margin-top: 32px; padding: 28px; max-width: none; }
  .account-page dialog { padding: 22px; }
}
@media (max-width: 400px) {
  .customer-sidebar .console-nav button { font-size: 11px; padding: 9px 8px; }
  .customer-sidebar .console-nav svg { display: none; }
  .console-content .section-toolbar { align-items: flex-start; flex-wrap: wrap; }
  .console-content .console-heading { flex-wrap: wrap; }
  .account-page #account-form > .row:first-of-type { flex-wrap: wrap; }
  .account-page #submit { min-width: 100%; }
}
/* Recent detections: photo-first review with compact context and local-day grouping. */
.account-page.signed-in #panel-events .detection-stats { margin: 0 0 30px; gap: 12px; }
.account-page.signed-in #panel-events .stat-card { min-height: 76px; padding: 15px 20px; border-radius: 13px; display: flex; flex-direction: row; align-items: center; gap: 14px; }
.account-page.signed-in #panel-events .stat-card strong { font-size: 28px; margin: 0; line-height: 1; }
.account-page.signed-in #panel-events .stat-card span { font-size: 12px; }
.detection-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.detection-toolbar h2 { margin: 0 0 5px; font-size: 24px; }
.detection-toolbar p { margin: 0; font-size: 12px; }
.detection-review-hint { font-size: 12px; color: var(--muted); }
.detection-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; padding: 16px; background: #12161d; border: 1px solid var(--line); border-radius: 13px; margin-bottom: 28px; }
.detection-filters label { display: grid; gap: 6px; font-size: 11px; color: var(--muted); min-width: 165px; }
.account-page .detection-filters select { padding: 10px 12px; font-size: 13px; min-height: 42px; width: 100%; }
.account-page .detection-filters button { margin-left: auto; min-height: 42px; font-size: 12px; }
.detection-day { margin-bottom: 30px; }
.detection-day h3 { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .1px; margin: 0 0 14px; }
.detection-day h3::after { content: ''; height: 1px; flex: 1; background: var(--line); }
.detection-gallery { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.account-page button.detection-card { display: block; min-width: 0; width: 100%; padding: 0; text-align: left; color: var(--ink); background: #12161d; border: 1px solid var(--line); border-radius: 15px; overflow: hidden; cursor: pointer; box-shadow: none; transition: border-color .18s, transform .18s, box-shadow .18s; }
.account-page button.detection-card:hover { border-color: #ff485b8a; transform: translateY(-3px); box-shadow: 0 8px 28px #0004; }
.account-page button.detection-card:focus-visible { outline: 3px solid var(--lime); outline-offset: 4px; }
.detection-preview { display: block; position: relative; aspect-ratio: 16 / 10; background: #080a0e; overflow: hidden; }
.detection-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }
.detection-shade { position: absolute; inset: 0; background: linear-gradient(0deg,#03050ab8,transparent 45%); }
.detection-media-label { position: absolute; bottom: 13px; left: 14px; color: #fff; font-size: 11px; font-weight: 600; }
.detection-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 1px solid #ffffff55; background: #090c16a3; color: #fff; padding-left: 3px; font-size: 16px; backdrop-filter: blur(6px); }
.detection-card:hover .detection-play { background: #ff485bd9; border-color: #ff485b; }
.detection-sample { position: absolute; left: 12px; top: 12px; font-size: 9px; letter-spacing: 1px; background: #0a0d14cf; color: #fff; padding: 4px 7px; border-radius: 5px; }
.detection-card-body { display: grid; gap: 12px; padding: 15px; }
.detection-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.detection-tag { font-size: 11px; font-weight: 650; padding: 4px 9px; border: 1px solid #ff485b33; border-radius: 6px; background: #ff485b15; color: #ff8996; }
.detection-tag[data-kind=dog],.detection-tag[data-kind=cat] { color: #b5a1ff; background: #b5a1ff13; border-color: #b5a1ff33; }
.detection-tag[data-kind=car],.detection-tag[data-kind=truck],.detection-tag[data-kind=motorcycle],.detection-tag[data-kind=bicycle] { color: #84cfff; background: #84cfff12; border-color: #84cfff33; }
.detection-tag[data-kind=movement] { color: #71dfbd; background: #71dfbd12; border-color: #71dfbd33; }
.detection-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.detection-meta strong { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detection-meta time { font-size: 11px; color: var(--muted); white-space: nowrap; }
.detection-no-preview { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; color: var(--muted); padding: 20px; }
.detection-empty { text-align: center; border: 1px dashed #394353; border-radius: 16px; padding: 50px 24px; background: radial-gradient(ellipse at top,#ff485b0c,transparent 70%); }
.detection-empty-icon { color: var(--lime); font-size: 40px; }
.detection-empty h3 { margin: 10px 0; font-size: 20px; }
.detection-empty p { color: var(--muted); max-width: 460px; margin: 0 auto 20px; font-size: 13px; }
.detection-history { border-top: 1px solid var(--line); padding-top: 24px; }
.detection-history:empty { display: none; }
.detection-history-title { font-size: 16px; font-weight: 600; }
.detection-history .fine { margin: 5px 0 16px; font-size: 12px; }
.detection-history .row { flex-wrap: wrap; }
@media (max-width: 1200px) { .detection-gallery { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 750px) {
  .account-page.signed-in #panel-events .detection-stats { gap: 8px; margin-bottom: 24px; }
  .account-page.signed-in #panel-events .stat-card { min-height: 83px; padding: 13px 10px; flex-direction: column; align-items: flex-start; gap: 8px; }
  .account-page.signed-in #panel-events .stat-card strong { font-size: 25px; }
  .account-page.signed-in #panel-events .stat-card span { font-size: 10px; }
  .detection-review-hint { display: none; }
  .detection-filters { padding: 12px; gap: 10px; }
  .detection-filters label { min-width: 0; flex: 1 1 130px; }
  .detection-filters label:first-child { flex-basis: 100%; }
  .detection-filters button { flex-basis: 100%; }
  .detection-gallery { gap: 12px; }
  .detection-card-body { padding: 12px; }
  .detection-meta { align-items: flex-start; flex-direction: column; gap: 4px; }
}
@media (max-width: 500px) { .detection-gallery { grid-template-columns: minmax(0,1fr); } .detection-meta { flex-direction: row; align-items: center; } }
@media (prefers-reduced-motion: reduce) { .account-page button.detection-card { transition: none; } .account-page button.detection-card:hover { transform: none; } }
/* Keep review tools close to the footage, and visible throughout scrolling. */
.account-page.viewing-events .console-content { padding-top: 20px; }
.account-page.viewing-events .console-heading { margin-bottom: 14px; }
.account-page.viewing-events .console-heading h1 { font-size: 23px; margin: 0; letter-spacing: -.6px; }
.account-page.viewing-events .console-heading .eyebrow,
.account-page.viewing-events #console-subtitle { display: none; }
.account-page.viewing-events #refresh { min-height: 36px; padding: 8px 12px; font-size: 12px; }
.account-page.signed-in #panel-events .detection-stats { gap: 10px; margin-bottom: 10px; }
.account-page.signed-in #panel-events .stat-card { min-height: 50px; padding: 10px 14px; gap: 10px; border-radius: 10px; }
.account-page.signed-in #panel-events .stat-card strong { font-size: 23px; }
.detection-filters { position: sticky; top: 8px; z-index: 15; padding: 10px 12px; margin-bottom: 18px; background: #12161df5; backdrop-filter: blur(14px); box-shadow: 0 6px 22px #0003; }
.detection-filters label { grid-template-columns: auto minmax(125px,1fr); align-items: center; gap: 10px; font-size: 11px; }
.account-page .detection-filters select { min-height: 36px; padding: 7px 10px; font-size: 12px; }
.account-page .detection-filters button { min-height: 36px; padding: 7px 12px; }
.detection-toolbar { margin-bottom: 14px; }
.detection-toolbar h2 { font-size: 19px; margin-bottom: 2px; }
.detection-toolbar p { font-size: 11px; }
.detection-day h3 { margin-bottom: 10px; }
@media (max-width:750px) {
  .account-page.signed-in #panel-events .stat-card { min-height: 59px; padding: 9px 10px; gap: 5px; }
  .account-page.signed-in #panel-events .stat-card strong { font-size: 21px; }
  .detection-filters { top: 0; padding: 10px; gap: 8px; }
  .detection-filters label { display: grid; grid-template-columns: minmax(0,1fr); gap: 4px; font-size: 10px; flex: 1 1 0; }
  .detection-filters label:first-child { flex-basis: 0; }
  .account-page .detection-filters select { padding: 7px; font-size: 11px; width: 100%; min-width: 0; }
  .account-page .detection-filters button { flex: 0 0 100%; }
}
.wall-overlay.has-play-prompt { z-index: 8; }
.account-page .wall-play-prompt { padding: 12px 18px; border: 1px solid #ff485b66; border-radius: 10px; background: #ff485b; color: #140609; font-weight: 700; }

/* Clip-led Events: one prominent latest moment, smaller previous detections. */
.detection-featured-row {display:grid;grid-template-columns:minmax(0,1.85fr) minmax(260px,1fr);gap:18px;align-items:start;margin-bottom:26px}
.detection-featured-row.solo {grid-template-columns:minmax(0,1fr)}
.detection-featured .detection-preview {aspect-ratio:16/9;max-height:470px}
.detection-featured .detection-play {width:64px;height:64px;font-size:22px}
.detection-featured .detection-card-body {padding:18px}
.detection-featured .detection-card-body::before {content:'LATEST DETECTION';font-size:10px;font-weight:750;letter-spacing:1.5px;color:var(--muted)}
.detection-recent-rail {display:grid;gap:12px}
.detection-recent-rail h3 {font-size:13px;color:var(--muted);margin:0 0 2px}
.account-page .detection-recent-rail button.detection-card,.account-page .detection-gallery button.detection-card {display:grid;grid-template-columns:112px minmax(0,1fr);align-items:center}
.detection-recent-rail .detection-preview,.detection-gallery .detection-preview {aspect-ratio:4/3;height:100%;min-height:96px}
.detection-recent-rail .detection-card-body,.detection-gallery .detection-card-body {gap:8px;padding:12px}
.detection-recent-rail .detection-media-label,.detection-gallery .detection-media-label {font-size:9px;bottom:7px;left:7px;right:7px}
.detection-recent-rail .detection-play,.detection-gallery .detection-play {width:32px;height:32px;font-size:12px}
.detection-recent-rail .detection-meta,.detection-gallery .detection-meta {flex-direction:column;align-items:start;gap:5px}
.detection-gallery {grid-template-columns:repeat(2,minmax(0,1fr))}
.event-review-dialog {width:min(1040px,96vw);max-width:1040px;padding:16px;border-radius:22px}
.event-review-header {display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.event-review-header h2 {font-size:17px;margin:0;line-height:1.3}
.event-review-stage {background:#030405;display:grid;place-items:center;min-height:180px;border-radius:14px;overflow:hidden}
.event-review-stage img,.event-review-stage video {display:block;width:100%;max-height:68dvh;object-fit:contain;margin:0;border-radius:0}
.event-review-stage [hidden] {display:none!important}
.event-review-actions {display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px}
.account-page .event-icon-button {display:grid;place-items:center;min-width:44px;width:44px;height:44px;padding:10px;background:#1b202a;border:1px solid #ffffff20;border-radius:12px;color:#fff;cursor:pointer}
.event-icon-button svg {width:22px;height:22px}.event-icon-button .pause-symbol,.event-icon-button.playing .play-symbol {display:none}.event-icon-button.playing .pause-symbol {display:block}
.event-icon-button[aria-pressed=true] {border-color:#ff4559;color:#ff4559}.event-review-actions #delete-event {margin-left:auto;color:#ff6575}
.event-icon-button[hidden] {display:none!important}.event-icon-button:focus-visible {outline:3px solid #ff4559;outline-offset:3px}
@media(max-width:1000px){.detection-featured-row{grid-template-columns:minmax(0,1fr)}.detection-recent-rail{grid-template-columns:repeat(3,minmax(0,1fr))}.detection-recent-rail h3{grid-column:1/-1}.account-page .detection-recent-rail button.detection-card{display:block}.detection-recent-rail .detection-preview{height:auto}}
@media(max-width:600px){.detection-recent-rail{grid-template-columns:minmax(0,1fr)}.account-page .detection-recent-rail button.detection-card{display:grid}.detection-gallery{grid-template-columns:minmax(0,1fr)}.event-review-dialog{padding:12px}.event-review-header h2{font-size:14px}.event-review-actions{gap:6px}.event-review-stage video{max-height:62dvh}}
.detection-recent-rail .detection-preview,.detection-gallery .detection-preview {width:100%;min-width:0;aspect-ratio:auto}
.detection-recent-rail .detection-card-body,.detection-gallery .detection-card-body {min-width:0}
@media(min-width:601px) and (max-width:1000px){.detection-recent-rail .detection-preview{aspect-ratio:4/3;min-height:0}}

/* Provider sign-in stays above email on both sign-in and signup. */
.provider-sign-in #provider-buttons{display:grid;gap:12px}.provider-button{width:100%;min-height:50px;display:flex;align-items:center;justify-content:center;gap:12px;background:#fff;color:#1f1f1f;border:1px solid #747775;border-radius:12px;font:500 16px/1.3 Arial,sans-serif;padding:12px 16px}.provider-button img{object-fit:contain}.provider-apple-mark{font-size:25px;line-height:20px}.provider-divider{display:flex;align-items:center;gap:12px;color:var(--muted,#a9afbc);font-size:12px;margin:16px 0}.provider-divider:before,.provider-divider:after{content:'';height:1px;flex:1;background:#303642}.provider-sign-in[hidden]{display:none}

/* Keep provider marks aligned while labels remain centered. */
.provider-sign-in #provider-buttons{gap:10px}.provider-button{position:relative;min-height:48px;padding:13px 50px;font:600 15px/1.35 Arial,sans-serif;border:1px solid #d6d8dc;border-radius:12px}.provider-button img{position:absolute;left:16px;top:50%;transform:translateY(-50%);width:20px;height:20px}.provider-sign-in>.fine{display:none}.provider-divider{margin:18px 0;color:#9ca4b2}.provider-button:disabled{opacity:.5;cursor:wait}

.email-sign-in-toggle{width:100%;display:flex;align-items:center;gap:12px;min-height:48px;padding:10px 16px;margin-top:12px;background:transparent;border:1px solid #363e4b;border-radius:12px;color:var(--muted);font-size:14px;text-align:left}.email-toggle-chevron{margin-left:auto}.email-sign-in-toggle[aria-expanded=true]{margin-bottom:16px}#account-form[hidden]{display:none}

/* Equal optical logo sizes and aligned labels across every sign-in choice. */
.provider-button,.email-sign-in-toggle{height:52px;min-height:52px;font:600 15px/1.4 Arial,sans-serif;border-radius:12px;transition:background .15s,box-shadow .15s}.provider-button{padding:12px 52px}.provider-button img{left:18px;width:20px;height:20px}.provider-button.provider-apple img{width:48px;height:48px;left:4px}.provider-button:hover{background:#f1f3f5}.provider-button:focus-visible,.email-sign-in-toggle:focus-visible{outline:2px solid #ff425c;outline-offset:3px}.email-sign-in-toggle{position:relative;justify-content:center;text-align:center;padding:12px 52px;color:#dce0e8;margin-top:10px}.email-sign-in-mark{position:absolute;left:18px;top:50%;transform:translateY(-50%);width:20px;height:20px}.email-toggle-chevron{position:absolute;right:18px;top:50%;transform:translateY(-50%);margin:0}.email-sign-in-toggle:hover{background:#1b222d}

/* Dark provider treatments match Zurcit’s surfaces and retain brand contrast. */
.provider-button{background:#131314;color:#f4f5f7;border-color:#464b55;box-shadow:0 1px 2px #0003}.provider-button:hover{background:#202126;border-color:#6b7280}.provider-button.provider-apple img{filter:invert(1);mix-blend-mode:screen}.provider-button:active{background:#292c33}.email-sign-in-toggle{background:transparent;color:#b8bfcc;border-color:#343b47}.email-sign-in-toggle:hover{background:#1b222d}
