.recording-state {
  display: none;
  align-items: center;
  gap: 9px;
  width: fit-content;
  margin: 12px 0;
  padding: 9px 12px;
  color: #fff;
  background: #e4007c;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.recording-state.active { display: flex; }
.recording-state i { width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: pulse 0.8s infinite; }
.recording-state strong { margin-left: 5px; font-variant-numeric: tabular-nums; }
.recording-state span b,.recording-state span small{display:block}.recording-state span small{margin-top:2px;font-size:8px;opacity:.8;letter-spacing:.04em}
.actions button b { margin-left: 6px; color: var(--green); }

#recordings-panel {
  display: none;
  position: fixed;
  z-index: 200;
  inset: 0;
  padding: 24px;
  align-items: center;
  justify-content: center;
  background: #000d;
  backdrop-filter: blur(16px);
}

#recordings-panel.active { display: flex; }
.recordings-card { width: min(1080px, 100%); max-height: calc(100vh - 48px); overflow: auto; padding: 26px; background: #0b0d11; border: 1px solid #343a43; border-radius: 12px; }
.recordings-card header { display: flex; justify-content: space-between; align-items: flex-start; }
.recordings-card header p { margin: 0 0 7px; color: var(--green); font-size: 10px; font-weight: 850; letter-spacing: 0.18em; }
.recordings-card h3 { margin: 0; font-size: 34px; letter-spacing: -0.04em; }
.recordings-card header button { border: 0; background: transparent; color: #fff; font-size: 34px; line-height: 1; }
.recordings-header-actions { display: flex; align-items: center; gap: 14px; }
.recordings-header-actions .storage-settings-link { display: grid; place-items: center; width: 34px; height: 34px; font-size: 0; border-radius: 50%; background: #ffffff10; }
.recordings-note { color: #9ca3ad; font-size: 13px; line-height: 1.5; }
#evidence-player { display: none; width: 100%; max-height: 330px; margin: 18px 0; background: #000; border-radius: 8px; }
#evidence-player.active { display: block; }
#evidence-image { display: none; width: 100%; max-height: 420px; object-fit: contain; margin: 18px 0; background: #000; border-radius: 8px; }
#evidence-image.active { display: block; }
#watchlist-panel { position: fixed; inset: 0; z-index: 30; display: none; align-items: center; justify-content: center; padding: 24px; overflow-y: auto; background: #050608ed; }
#watchlist-panel.active { display: flex; }
.watchlist-card { width: min(720px, 100%); margin: auto; }
#watchlist-form { display: grid; gap: 10px; padding: 16px; margin: 14px 0; border: 1px solid #303640; border-radius: 10px; background: #090c10; }
#watchlist-form input[type="text"] { width: 100%; padding: 12px; border: 1px solid #3a414b; border-radius: 6px; background: #0c0e11; color: #fff; }
#watchlist-photos { display: none; }
.watchlist-upload { padding: 16px; border: 1px dashed #69717c; border-radius: 8px; color: #fff; text-align: center; cursor: pointer; }
.watchlist-upload small { display: block; margin-top: 5px; color: #9299a3; }
.watchlist-status { padding: 10px 0; color: #aeb5be; font-size: 12px; }
.watchlist-person { display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid #292f37; }
.watchlist-person img { width: 58px; height: 58px; border-radius: 8px; object-fit: cover; }
.watchlist-person strong,.watchlist-person small { display: block; }.watchlist-person small { margin-top: 4px; color: #9299a3; }
.watchlist-person button { color: #ff6fb8; border: 1px solid #e4007c55; background: transparent; border-radius: 6px; padding: 8px; }
#remote-evidence-panel{position:fixed;inset:0;z-index:45;display:none;align-items:center;justify-content:center;padding:12px;background:#050608f5}#remote-evidence-panel.active{display:flex}.remote-evidence-card{width:min(680px,100%);max-height:calc(100dvh - 24px);overflow:auto;padding:20px;border:1px solid #343a43;border-radius:14px;background:#0b0d11}.remote-evidence-card header{display:flex;align-items:flex-start;justify-content:space-between}.remote-evidence-card header p{margin:0;color:var(--green);font-size:9px;font-weight:850;letter-spacing:.16em}.remote-evidence-card h3{margin:3px 0 0;font-size:30px}.remote-evidence-card header button{border:0;background:transparent;color:#fff;font-size:32px}.remote-evidence-card>p{color:#aab0b8;font-size:11px}#remote-evidence-player,#remote-evidence-image{display:none;width:100%;max-height:48dvh;object-fit:contain;margin:12px 0;border-radius:8px;background:#000}#remote-evidence-player.active,#remote-evidence-image.active{display:block}#remote-evidence-actions{display:none;gap:8px;margin:10px 0}#remote-evidence-actions.active{display:flex}#remote-evidence-actions button{min-height:42px;padding:0 14px;border:1px solid #ffffff35;border-radius:6px;background:#11151a;color:#fff}.remote-gallery-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));grid-auto-rows:min-content;align-content:start;gap:10px}
.remote-evidence-row{position:relative;display:flex;flex-direction:column;width:100%;padding:0;border:1px solid #292f37;border-radius:10px;background:#0a0c10;color:#fff;text-align:left;overflow:hidden;cursor:pointer;border-left:3px solid var(--category,#e4007c)}
.remote-evidence-row:hover{border-color:#454c57;border-left-color:var(--category,#e4007c)}
.remote-evidence-row.active-remote-evidence{box-shadow:0 0 0 1px #e4007c}
.remote-evidence-thumb{position:relative;width:100%;aspect-ratio:16/10;background:#050608;overflow:hidden}
.remote-evidence-thumb.portrait{aspect-ratio:9/16}
.remote-evidence-thumb img{width:100%;height:100%;object-fit:cover}
.remote-evidence-thumb-empty{display:grid;place-items:center;background:linear-gradient(160deg,#13161b,#0a0b0d)}
.remote-evidence-thumb-empty:after{content:'';width:20px;height:20px;border:2px solid #2a2f37;border-top-color:#e4007c;border-radius:50%;animation:spin .8s linear infinite}
.remote-evidence-thumb .thumb-play{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#000b;color:#fff;font-style:normal;font-size:10px}
.remote-evidence-details{display:block;padding:8px 9px}
.remote-evidence-details strong{display:block;font-size:11px;font-weight:750;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.remote-evidence-details small{display:block;margin-top:4px;color:#9097a1;font-size:9px}
.remote-evidence-details .remote-storage-state{font-size:7px;font-weight:850;letter-spacing:.06em}
.remote-evidence-details .remote-storage-state.is-stored{color:#65dfac}
.remote-evidence-details .remote-storage-state.is-progress{color:#c5cbd3}
.remote-evidence-details .remote-storage-state.is-memory{color:#ffd27a}
.remote-evidence-details .remote-storage-state.is-error{color:#ff6fae}
.remote-gallery-empty{grid-column:1/-1;padding:24px 0;color:#737b86;font-size:11px;text-align:center}
.remote-gallery-filters{margin-bottom:2px}
.drive-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 12px; margin: 14px 0; border: 1px solid #303640; border-radius: 9px; background: #080b0f; font-size: 11px; }.drive-toolbar span{margin-right:auto;color:#ffffff}.drive-toolbar label{display:flex;align-items:center;gap:6px;color:#b7bdc5}
.evidence-filters { display:flex;gap:7px;overflow-x:auto;padding:4px 0 12px; }.evidence-filters button,.evidence-select-tools button,.bulk-actions button{white-space:nowrap;min-height:36px;padding:0 10px;border:1px solid #343a43;border-radius:2px;background:#101318;color:#c8cdd3;font-size:10px}.evidence-filters button.active{border-color:var(--green);color:#080a0b;background:var(--green)}.evidence-filters b{margin-left:4px}
.evidence-filters button>i{font-style:normal}.evidence-filters button>span{display:inline}.evidence-filters button>b{font-variant-numeric:tabular-nums}
@media(max-width:800px){.evidence-filters{display:grid!important;grid-auto-flow:column;grid-auto-columns:72px;grid-template-rows:62px;gap:7px;width:100%;padding:3px 1px 9px;overflow-x:auto!important;overflow-y:hidden!important;scroll-snap-type:x proximity;scroll-padding-inline:1px;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}.evidence-filters button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;width:72px;height:62px;min-height:62px;padding:6px 4px;border-radius:9px;white-space:normal;scroll-snap-align:start;line-height:1}.evidence-filters button>i{display:block;font-size:15px;line-height:1}.evidence-filters button>span{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;font-size:8px;font-weight:800}.evidence-filters button>b{position:absolute;right:5px;top:5px;display:grid;place-items:center;min-width:16px;height:16px;margin:0;padding:0 4px;border-radius:999px;background:#ffffff12;font-size:7px}.evidence-filters button.active>b{background:#080a0b18}.evidence-filters>#storage-used{display:none}.remote-gallery-filters{flex:0 0 auto!important;min-height:74px}}
.evidence-select-tools{display:flex;align-items:center;gap:8px;margin-bottom:8px}.evidence-select-tools span{margin-left:auto;color:#9299a3;font-size:10px}
.bulk-actions{display:none;position:sticky;top:0;z-index:4;align-items:center;gap:7px;padding:10px;margin-bottom:8px;border:1px solid #ffffff33;border-radius:8px;background:#101318f2}.bulk-actions.active{display:flex}.bulk-actions strong{margin-right:auto;font-size:11px}.bulk-actions .danger-button{border-color:#e4007c;color:#ff6fb8}
.evidence-row { --category:#7f8791; display: grid; grid-template-columns: 110px 1fr auto; gap: 15px; align-items: center; padding: 15px 10px; border-top: 1px solid #292e36; border-left:3px solid var(--category); }
.evidence-row.category-motion,.remote-evidence-row.category-motion{--category:#ffffff}.evidence-row.category-sound,.remote-evidence-row.category-sound{--category:#c7cbd1}.evidence-row.category-face,.remote-evidence-row.category-face{--category:#ffffff}.evidence-row.category-manual,.remote-evidence-row.category-manual{--category:#9aa1ab}.evidence-row.category-photo,.remote-evidence-row.category-photo{--category:#ffffff}.remote-evidence-row.category-other{--category:#4a5058}
.evidence-selector{width:18px;height:18px;accent-color:var(--green)}
.evidence-thumb { display: grid; place-items: center; width: 92px; aspect-ratio: 16/10; overflow: hidden; border: 1px solid #303640; border-radius: 7px; background: #050608; color: #68707a; font-size: 9px; font-weight: 850; letter-spacing: .12em; cursor: pointer; }
.evidence-thumb.portrait{aspect-ratio:9/16}
.evidence-thumb img { width: 100%; height: 100%; object-fit: cover; }
.evidence-badge{position:absolute;left:4px;top:4px;padding:3px 5px;border-radius:3px;background:#050608df;color:#fff;font-size:7px;font-weight:850}.evidence-thumb{position:relative;width:110px}.thumb-play{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);display:grid;place-items:center;width:27px;height:27px;border-radius:50%;background:#000b;color:#fff;font-style:normal}.evidence-thumb time{position:absolute;right:4px;bottom:4px;padding:2px 4px;background:#000d;color:#fff;font-size:8px}
.evidence-row strong { display: block; font-size: 14px; }
.evidence-time { display: block; margin-top: 4px; color: #c2c7ce; font-size: 11px; }
.evidence-row small { display: block; margin-top: 5px; color: #858c96; }
.evidence-actions { display: flex; gap: 7px; }
.evidence-actions button { min-height: 38px; padding: 0 11px; border: 1px solid #ffffff35; border-radius: 5px; background: #141820; color: #fff; }
.evidence-actions .delete-evidence { color: #ff6fb8; }
.evidence-actions .share-evidence { color: var(--green); border-color: #ffffff40; }
.recordings-empty { padding: 34px 0; text-align: center; color: #8f96a0; }
.recordings-empty strong,.recordings-empty span{display:block}.recordings-empty strong{color:#fff;font-size:18px}.recordings-empty span{max-width:540px;margin:8px auto 0;font-size:12px;line-height:1.5}

@media (max-width: 600px) {
  #recordings-panel { padding: 12px; }
  .recordings-card { padding: 20px; max-height: calc(100vh - 24px); }
  .evidence-row { grid-template-columns: 82px 1fr; padding:12px 4px; gap:9px; }
  .evidence-thumb { width: 76px; }
  .evidence-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, 1fr); }
  .evidence-actions button { padding: 0 5px; font-size: 10px; }
}

/* Logs de sesiones (historial local de tiempo transmitido) */
.logs-card{width:min(680px,100%);max-height:calc(100dvh - 24px);overflow:auto}
.logs-summary{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px 0}
.logs-summary div{padding:16px;border:1px solid #303640;text-align:center}
.logs-summary strong{display:block;font-size:26px;font-weight:900}
.logs-summary span{display:block;margin-top:4px;color:#9299a3;font-size:11px}
.logs-toolbar{display:flex;justify-content:flex-end;margin-bottom:10px}
.log-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;padding:14px 0;border-top:1px solid #292f37}
.log-row-date{min-width:100px}
.log-row-date strong{display:block;font-size:14px}
.log-row-date small{color:#9299a3;font-size:11px}
.log-row-stats{display:flex;flex-wrap:wrap;gap:14px;color:#c8cdd3;font-size:12px}
.log-row-stats b{color:#fff;font-weight:800}
@media(max-width:600px){.logs-summary{grid-template-columns:1fr}.log-row-stats{gap:8px 14px;font-size:11px}}
.exit-cleanup-modal{position:fixed;inset:0;z-index:1200;display:none;place-items:center;padding:18px;background:#030405ed;backdrop-filter:blur(18px)}.exit-cleanup-modal.active{display:grid}.exit-cleanup-sheet{width:min(92vw,520px);max-height:calc(100vh - 36px);max-height:calc(100dvh - 36px);overflow:auto;padding:24px;border:1px solid #ffffff22;border-radius:18px;background:#0c1015;box-shadow:0 30px 100px #000c}.exit-cleanup-sheet>span{color:#e4007c;font-size:8px;font-weight:900;letter-spacing:.18em}.exit-cleanup-sheet h3{margin:7px 0 8px;font-size:26px;letter-spacing:-.035em}.exit-cleanup-sheet>p{margin:0;color:#a4acb6;font-size:12px;line-height:1.55}.exit-storage-plan{display:flex;align-items:center;gap:10px;margin:17px 0;padding:12px;border:1px solid #ffffff16;border-radius:11px;background:#11161c}.exit-storage-plan>i{flex:0 0 auto;width:10px;height:10px;border-radius:50%;background:#65dfac;box-shadow:0 0 12px #65dfac99}.exit-storage-plan span{display:grid;gap:4px}.exit-storage-plan b{font-size:10px;letter-spacing:.06em}.exit-storage-plan small{color:#858e99;font-size:9px;line-height:1.4}.exit-cleanup-actions{display:grid;gap:8px}.exit-cleanup-actions button{min-height:48px;margin:0}.exit-cleanup-warning{display:block;margin-top:14px;color:#7f8792;font-size:9px;line-height:1.5}.exit-cleanup-modal.busy .exit-cleanup-actions{opacity:.45;pointer-events:none}@media(max-width:600px){.exit-cleanup-modal{place-items:end center;padding:0}.exit-cleanup-sheet{width:100%;max-height:94vh;max-height:94dvh;padding:22px 18px calc(18px + env(safe-area-inset-bottom));border-radius:20px 20px 0 0}.exit-cleanup-sheet h3{font-size:24px}}
#activity-panel{display:none;position:fixed;z-index:210;inset:0;align-items:center;justify-content:center;padding:18px;background:#050608ee;backdrop-filter:blur(16px)}#activity-panel.active{display:flex}.activity-card{width:min(760px,100%)}.activity-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin:15px 0}.activity-head p{max-width:500px;margin:0;color:#929aa5;font-size:11px;line-height:1.5}.activity-head strong{flex:0 0 auto;color:#cbd0d6;font-size:9px}.activity-list{display:grid}.activity-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:11px;width:100%;min-height:62px;padding:10px 4px;border:0;border-top:1px solid #292f37;background:transparent;color:#fff;text-align:left}.activity-row>i{width:10px;height:10px;border-radius:50%;background:#727b86;box-shadow:0 0 10px #727b8655}.activity-row.warning>i{background:#e4007c;box-shadow:0 0 10px #e4007c88}.activity-row.critical>i{background:#ff386f;box-shadow:0 0 13px #ff386faa}.activity-row>span{display:grid;gap:4px}.activity-row strong{font-size:11px;line-height:1.35}.activity-row small{color:#8d96a1;font-size:9px}.activity-row em{padding:5px 7px;border:1px solid #ffffff16;border-radius:6px;color:#8f98a3;font-size:7px;font-style:normal;font-weight:850;letter-spacing:.06em}.activity-row.has-media{cursor:pointer}.activity-row.has-media em{border-color:#65dfac45;color:#65dfac}.activity-row.has-media:active{background:#ffffff08}@media(max-width:600px){#activity-panel{align-items:flex-end;padding:0}.activity-card{width:100%;max-height:95vh;max-height:95dvh;padding:19px 16px calc(16px + env(safe-area-inset-bottom));border-radius:18px 18px 0 0}.activity-head{display:grid}.activity-row{grid-template-columns:auto minmax(0,1fr)}.activity-row em{grid-column:2;justify-self:start}}
#logs-panel{display:none;position:fixed;z-index:200;inset:0;padding:calc(24px + max(10px, env(safe-area-inset-top))) 24px 24px;align-items:center;justify-content:center;background:#000d;backdrop-filter:blur(16px)}
#logs-panel .logs-card{max-height:calc(100dvh - 24px - max(10px, env(safe-area-inset-top)))!important;overflow-y:auto!important}
#logs-panel.active{display:flex}
