
:root{--st:env(safe-area-inset-top,0px);--sb:env(safe-area-inset-bottom,0px);--sl:env(safe-area-inset-left,0px);--sr:env(safe-area-inset-right,0px);--line:rgba(255,255,255,.16);--panel:rgba(6,18,36,.72);--yellow:#f59e0b}
*{box-sizing:border-box}[hidden]{display:none!important}html,body,#app{margin:0;width:100%;height:100%;overflow:hidden;background:#000;color:#fff;font-family:system-ui,-apple-system,Segoe UI,sans-serif}button,select,input,textarea{font:inherit}button{cursor:pointer}.camera-view{position:fixed;inset:0;background:#000;overflow:hidden}#video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#000}body.front-camera #video{transform:scaleX(-1)}
.topbar{position:fixed;top:0;left:0;right:0;z-index:90;min-height:calc(68px + var(--st));padding:calc(10px + var(--st)) 14px 10px;display:flex;align-items:center;justify-content:center;background:linear-gradient(180deg,rgba(2,6,23,.86),rgba(2,6,23,.28),transparent);pointer-events:none}.topbar>*{pointer-events:auto}.topbtn{position:absolute;top:calc(12px + var(--st));left:calc(14px + var(--sl));width:56px;height:56px;border-radius:20px;border:1px solid var(--line);background:rgba(8,16,34,.75);color:#fff;font-size:28px;font-weight:900;backdrop-filter:blur(12px)}.topbtn.right{left:auto;right:calc(14px + var(--sr));font-size:22px}.brand{display:flex;align-items:center;gap:9px}.brand b{font-size:clamp(20px,5vw,29px)}.brand span{font-size:10px;font-weight:950;color:#86efac;border:1px solid rgba(74,222,128,.26);background:rgba(16,185,129,.22);border-radius:999px;padding:5px 9px}
.empty{position:fixed;left:20px;right:20px;top:43%;z-index:20;text-align:center;transform:translateY(-50%);pointer-events:none}.empty b{font-size:clamp(27px,7vw,40px)}.empty p{color:rgba(255,255,255,.72);margin:8px auto 0}.camera-running .empty{display:none}.start{position:fixed;left:50%;top:56%;transform:translate(-50%,-50%);z-index:95;min-width:min(86vw,370px);min-height:62px;border:0;border-radius:999px;background:linear-gradient(135deg,#fbbf24,#f59e0b);color:#1f1600;font-size:18px;font-weight:950;box-shadow:0 18px 42px rgba(245,158,11,.34),0 18px 36px rgba(0,0,0,.32)}.camera-running .start{display:none}
.chip{position:fixed;z-index:65;border:1px solid var(--line);background:var(--panel);border-radius:999px;padding:8px 11px;font-size:12px;font-weight:900;backdrop-filter:blur(12px)}.gps-chip{right:calc(14px + var(--sr));top:calc(82px + var(--st));max-width:120px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.count-chip{left:calc(18px + var(--sl));bottom:calc(102px + var(--sb));min-width:36px;text-align:center}
.watermark{position:fixed;left:14px;bottom:calc(140px + var(--sb));z-index:55;width:min(calc(100vw - 28px),560px);padding:11px 13px;border-radius:20px;background:linear-gradient(180deg,rgba(10,18,34,.22),rgba(2,6,23,.68));border:1px solid var(--line);box-shadow:0 16px 34px rgba(0,0,0,.28);backdrop-filter:blur(12px);touch-action:none;user-select:none}.wm-brand{color:#fbbf24;font-size:11px;font-weight:950;letter-spacing:.08em}.wm-time{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap}.wm-time strong{font-size:clamp(36px,10vw,54px);line-height:.9;font-weight:300}.wm-time span{font-size:15px;font-weight:900}.wm-address,.wm-meta{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.25}.wm-address{font-size:13px;font-weight:850;margin-top:6px}.wm-meta{font-size:12px;margin-top:4px;color:rgba(255,255,255,.9)}.wm-small .watermark{transform:scale(.82);transform-origin:left bottom}.wm-large .watermark{transform:scale(1.12);transform-origin:left bottom}
.zoom-dock{position:fixed;right:calc(16px + var(--sr));top:35dvh;z-index:70;touch-action:none}.zoom-main,.zoom-options button{width:58px;height:46px;border-radius:999px;border:1px solid var(--line);background:rgba(8,16,34,.72);color:#fff;font-size:14px;font-weight:950;box-shadow:0 12px 24px rgba(0,0,0,.25);backdrop-filter:blur(12px)}.zoom-main{background:rgba(245,158,11,.95);color:#1f1600}.zoom-options{display:grid;gap:8px;margin-top:8px}.zoom-options button.active{background:#f59e0b;color:#1f1600}
.capture{position:fixed;z-index:72;width:72px;height:72px;border-radius:999px;border:6px solid rgba(255,255,255,.95);outline:4px solid rgba(245,158,11,.25);background:radial-gradient(circle at 50% 42%,#ffd970 0,#f59e0b 48%,#d97706 100%);box-shadow:0 14px 34px rgba(245,158,11,.24),0 10px 22px rgba(0,0,0,.28)}.shutter-center .capture{left:calc(50vw - 36px);bottom:calc(30px + var(--sb))}.shutter-left .capture{left:calc(88px + var(--sl));bottom:calc(30px + var(--sb))}.shutter-right .capture{right:calc(88px + var(--sr));bottom:calc(30px + var(--sb))}
.ctrl{position:fixed;z-index:71;width:54px;height:54px;border-radius:999px;border:1px solid var(--line);background:rgba(8,16,34,.68);color:#fff;font-size:22px;box-shadow:0 12px 24px rgba(0,0,0,.25);backdrop-filter:blur(12px)}.gallery{right:calc(16px + var(--sr));bottom:calc(38px + var(--sb))}.switch{right:calc(82px + var(--sr));bottom:calc(38px + var(--sb))}.gps{left:calc(16px + var(--sl));bottom:calc(38px + var(--sb))}.edit-ui .movable{outline:2px dashed rgba(251,191,36,.95);outline-offset:4px}.dragging{opacity:.86}.toast{position:fixed;left:50%;bottom:calc(116px + var(--sb));transform:translateX(-50%) translateY(10px);z-index:130;max-width:86vw;padding:10px 14px;border-radius:999px;background:rgba(6,18,36,.92);border:1px solid var(--line);font-size:13px;font-weight:900;opacity:0;pointer-events:none;transition:.18s}.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
.panel{position:fixed;inset:0;z-index:150;background:#f6f8fb;color:#0f172a;overflow:auto;padding:calc(18px + var(--st)) 16px calc(18px + var(--sb))}.panel-head{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:12px;background:rgba(246,248,251,.92);backdrop-filter:blur(10px);padding-bottom:10px;margin-bottom:12px}.panel-head h2{margin:0;font-size:24px}.panel-head p{margin:2px 0 0;color:#64748b;font-size:12px;font-weight:700}.panel-head button,.card button{border:0;border-radius:14px;padding:10px 12px;background:#0b3b75;color:#fff;font-weight:850}.filters{display:flex;gap:8px;overflow-x:auto;padding-bottom:10px;margin-bottom:12px}.filters button{white-space:nowrap;border:1px solid #dbe4ef;border-radius:999px;background:#fff;color:#0f172a;padding:8px 12px;font-weight:850}.filters button.active{background:#0b3b75;color:#fff}.records{display:grid;gap:12px}.record{display:grid;grid-template-columns:28px 96px 1fr;gap:10px;background:#fff;border:1px solid #dbe4ef;border-radius:18px;padding:10px;box-shadow:0 8px 18px rgba(15,23,42,.06)}.record img{width:96px;height:96px;border-radius:14px;object-fit:cover}.record h3{margin:0 0 4px;font-size:14px}.record p{margin:2px 0;color:#475569;font-size:12px;line-height:1.35}.tags{display:flex;gap:6px;flex-wrap:wrap;margin:5px 0}.tag{font-size:11px;font-weight:850;border-radius:999px;background:#eef4fb;padding:4px 7px}.record-actions{display:flex;gap:6px;margin-top:8px;flex-wrap:wrap}.record-actions button{border:0;border-radius:10px;padding:7px 9px;background:#eef4fb;color:#0f172a;font-size:12px;font-weight:850}.danger{background:#fee2e2!important;color:#991b1b!important}.card{background:#fff;border:1px solid #dbe4ef;border-radius:20px;padding:18px;display:grid;gap:12px;margin-bottom:14px}.card h3{margin:0}.card button.primary,.sheet-card button.primary{background:#f59e0b;color:#1f1600}
.sheet{position:fixed;inset:0;z-index:200;background:rgba(0,0,0,.48);display:grid;place-items:end center;padding:16px}.sheet-card{position:relative;width:min(450px,100%);max-height:92dvh;overflow:auto;background:#fff;color:#0f172a;border-radius:24px;padding:18px;display:grid;gap:10px;box-shadow:0 20px 50px rgba(0,0,0,.28)}.sheet-card h3{margin:0 0 6px}.sheet-card label{display:grid;gap:5px;font-size:12px;font-weight:850;color:#475569}.sheet-card input,.sheet-card textarea,.sheet-card select{width:100%;border:1px solid #dbe4ef;border-radius:14px;padding:10px;color:#0f172a;background:#f8fafc}.sheet-card button{border:0;border-radius:16px;padding:13px;background:#eef4fb;color:#0f172a;font-weight:850;text-align:left}.close{position:absolute;right:14px;top:14px;width:42px;height:42px;border-radius:999px;text-align:center!important;font-size:24px;background:#0f172a!important;color:#fff!important}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}.opt-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media (orientation:landscape){.topbar{justify-content:flex-start;min-height:calc(60px + var(--st));padding-left:calc(14px + var(--sl))}.topbtn{width:52px;height:52px;border-radius:18px;font-size:26px}.brand{margin-left:64px}.brand b{font-size:20px}.gps-chip,.count-chip{display:none}.watermark{left:16px;bottom:16px;width:min(46vw,560px)}.zoom-dock{right:calc(104px + var(--sr));top:calc(50dvh - 24px)}.shutter-center .capture,.shutter-left .capture,.shutter-right .capture{left:auto;right:calc(18px + var(--sr));bottom:auto;top:calc(50dvh - 36px)}.gallery{right:calc(18px + var(--sr));bottom:auto;top:calc(50dvh + 54px)}.switch{right:calc(18px + var(--sr));bottom:auto;top:calc(50dvh + 116px)}.gps{left:auto;right:calc(18px + var(--sr));bottom:auto;top:calc(50dvh - 116px)}}


/* =========================================================
   FIX V46.1 - MENU / MODALES OCULTOS DE VERDAD
   Evita que .menu-sheet { display:grid } fuerce el menú abierto.
   ========================================================= */
[hidden],
.menu-sheet[hidden],
.modal[hidden],
#menuSheet[hidden],
#editModal[hidden],
#optionsSheet[hidden],
#settingsSheet[hidden] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.menu-sheet:not([hidden]),
#menuSheet:not([hidden]) {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

body.menu-open {
  overflow: hidden !important;
}


/* FIX V46.2 - reportes y compartir */
.report-note-v462{
  margin:8px 0 0;
  padding:10px 12px;
  border-radius:14px;
  background:#fff7ed;
  color:#7c2d12;
  font-size:13px;
  line-height:1.35;
  font-weight:750;
}


/* =========================================================
   V47 - REPORTE PROFESIONAL TIPO HOJA DE FOTOS
   ========================================================= */
.v47-report-panel {
  margin-top: 12px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, #eff6ff, #ffffff);
  border: 1px solid #dbeafe;
  color: #0f172a;
}

.v47-report-panel h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: #0b3b75;
}

.v47-report-panel p {
  margin: 0 0 10px;
  color: #475569;
  font-size: 13px;
  line-height: 1.35;
}

.v47-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.v47-mini-card {
  padding: 10px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #dbe4ef;
  font-weight: 850;
  font-size: 12px;
  color: #0f172a;
}

.v47-primary {
  background: #f59e0b !important;
  color: #1f1600 !important;
}

.v47-secondary {
  background: #0b3b75 !important;
  color: #fff !important;
}

.v47-soft {
  background: #eef4fb !important;
  color: #0f172a !important;
}


/* =========================================================
   V48 - FLUJO REPORTE FINAL
   Selección útil + reporte sin duplicados + acciones claras
   ========================================================= */

.v48-selection-bar {
  position: sticky;
  top: 86px;
  z-index: 25;
  display: none;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
  margin: 8px 0 12px;
  padding: 10px;
  border-radius: 18px;
  background: #0b3b75;
  color: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.v48-selection-bar.show {
  display: flex;
}

.v48-selection-count {
  white-space: nowrap;
  font-weight: 950;
  margin-right: 4px;
}

.v48-selection-bar button {
  border: 0;
  border-radius: 999px;
  padding: 9px 12px;
  font-weight: 900;
  white-space: nowrap;
  background: rgba(255,255,255,.14);
  color: #fff;
}

.v48-selection-bar button.primary {
  background: #f59e0b;
  color: #1f1600;
}

.v48-selection-bar button.danger {
  background: #fee2e2;
  color: #991b1b;
}

.v48-report-clean .export-card,
.v48-report-clean .export-box {
  display: none !important;
}

.v48-final-report {
  display: grid;
  gap: 14px;
}

.v48-card {
  background: #fff;
  border: 1px solid #dbe4ef;
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 8px 18px rgba(15,23,42,.04);
}

.v48-card h3 {
  margin: 0 0 12px;
  font-size: 21px;
  color: #0f172a;
}

.v48-card p {
  margin: 4px 0;
  color: #475569;
  line-height: 1.35;
}

.v48-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.v48-filters button {
  border: 1px solid #dbe4ef;
  border-radius: 999px;
  padding: 9px 13px;
  background: #fff;
  color: #0f172a;
  font-weight: 900;
  white-space: nowrap;
}

.v48-filters button.active {
  background: #0b3b75;
  color: #fff;
}

.v48-mode {
  display: grid;
  gap: 8px;
}

.v48-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #dbe4ef;
  border-radius: 16px;
  background: #f8fafc;
  font-weight: 850;
}

.v48-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.v48-stat {
  border: 1px solid #dbe4ef;
  border-radius: 16px;
  padding: 12px;
  background: #f8fafc;
}

.v48-stat strong {
  display: block;
  font-size: 24px;
  color: #0b3b75;
}

.v48-stat span {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.v48-actions {
  display: grid;
  gap: 10px;
}

.v48-actions button {
  border: 0;
  border-radius: 16px;
  padding: 14px 12px;
  font-size: 16px;
  font-weight: 950;
}

.v48-actions .yellow {
  background: #f59e0b;
  color: #1f1600;
}

.v48-actions .blue {
  background: #0b3b75;
  color: #fff;
}

.v48-actions .soft {
  background: #eef4fb;
  color: #0f172a;
}

.v48-note {
  background: #fff7ed;
  color: #7c2d12;
  border-radius: 16px;
  padding: 12px;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

.v48-hidden-duplicate {
  display: none !important;
}


/* =========================================================
   V49 - EXCEL REAL + REPORTE LIMPIO
   ========================================================= */
#exportView.v49-report-clean > .export-card,
#exportView.v49-report-clean > .export-box,
#exportView.v49-report-clean > .v47-report-panel,
#exportView.v49-report-clean > .v48-final-report {
  display: none !important;
}

.v49-report {
  display: grid;
  gap: 14px;
}

.v49-card {
  background: #fff;
  border: 1px solid #dbe4ef;
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 8px 18px rgba(15,23,42,.04);
}

.v49-card h3 {
  margin: 0 0 12px;
  font-size: 21px;
  color: #0f172a;
}

.v49-card p {
  margin: 4px 0;
  color: #475569;
  line-height: 1.35;
}

.v49-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.v49-filters button {
  border: 1px solid #dbe4ef;
  border-radius: 999px;
  padding: 9px 13px;
  background: #fff;
  color: #0f172a;
  font-weight: 900;
  white-space: nowrap;
}

.v49-filters button.active {
  background: #0b3b75;
  color: #fff;
}

.v49-mode {
  display: grid;
  gap: 8px;
}

.v49-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #dbe4ef;
  border-radius: 16px;
  background: #f8fafc;
  font-weight: 850;
}

.v49-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.v49-stat {
  border: 1px solid #dbe4ef;
  border-radius: 16px;
  padding: 12px;
  background: #f8fafc;
}

.v49-stat strong {
  display: block;
  font-size: 24px;
  color: #0b3b75;
}

.v49-stat span {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.v49-actions {
  display: grid;
  gap: 10px;
}

.v49-actions button {
  border: 0;
  border-radius: 16px;
  padding: 14px 12px;
  font-size: 16px;
  font-weight: 950;
}

.v49-actions .yellow { background: #f59e0b; color: #1f1600; }
.v49-actions .blue { background: #0b3b75; color: #fff; }
.v49-actions .soft { background: #eef4fb; color: #0f172a; }
.v49-actions .danger { background: #fee2e2; color: #991b1b; }

.v49-note {
  background: #fff7ed;
  color: #7c2d12;
  border-radius: 16px;
  padding: 12px;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

.v49-selection-bar {
  position: sticky;
  top: 86px;
  z-index: 25;
  display: none;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
  margin: 8px 0 12px;
  padding: 10px;
  border-radius: 18px;
  background: #0b3b75;
  color: #fff;
  box-shadow: 0 10px 24px rgba(15,23,42,.18);
}

.v49-selection-bar.show {
  display: flex;
}

.v49-selection-bar span {
  white-space: nowrap;
  font-weight: 950;
}

.v49-selection-bar button {
  border: 0;
  border-radius: 999px;
  padding: 9px 12px;
  font-weight: 900;
  white-space: nowrap;
  background: rgba(255,255,255,.14);
  color: #fff;
}

.v49-selection-bar button.primary { background: #f59e0b; color: #1f1600; }
.v49-selection-bar button.danger { background: #fee2e2; color: #991b1b; }


/* =========================================================
   V50 - EXCEL FINAL RESPONSIVE
   Limpia duplicados y deja una sola pantalla de reporte.
   ========================================================= */

#exportView.v50-report-final > .export-card,
#exportView.v50-report-final > .export-box,
#exportView.v50-report-final > .v47-report-panel,
#exportView.v50-report-final > .v48-final-report,
#exportView.v50-report-final > .v49-report,
#exportView.v50-report-final .report-note-v462 {
  display: none !important;
}

#v48SelectionBar,
.v48-selection-bar,
#v49SelectionBar,
.v49-selection-bar {
  display: none !important;
}

.v50-selection-bar {
  position: sticky;
  top: 76px;
  z-index: 60;
  display: none;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 8px;
  margin: 8px 0 12px;
  padding: 10px;
  border-radius: 18px;
  background: #0b3b75;
  color: #fff;
  box-shadow: 0 10px 24px rgba(15,23,42,.18);
  max-width: 100%;
}

.v50-selection-bar.show { display: grid; }

.v50-selection-count {
  white-space: nowrap;
  font-weight: 950;
  font-size: 14px;
}

.v50-selection-bar button {
  border: 0;
  border-radius: 999px;
  padding: 9px 10px;
  font-weight: 900;
  white-space: nowrap;
  background: rgba(255,255,255,.14);
  color: #fff;
  min-height: 38px;
}

.v50-selection-bar .primary { background: #f59e0b; color: #1f1600; }
.v50-selection-bar .danger { background: #fee2e2; color: #991b1b; }

.v50-report {
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

.v50-card {
  background: #fff;
  border: 1px solid #dbe4ef;
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 8px 18px rgba(15,23,42,.04);
  overflow: hidden;
}

.v50-card h3 {
  margin: 0 0 12px;
  font-size: clamp(18px, 5vw, 22px);
  color: #0f172a;
}

.v50-card p {
  margin: 4px 0;
  color: #475569;
  line-height: 1.35;
  font-size: 14px;
}

.v50-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.v50-filters button {
  flex: 0 0 auto;
  border: 1px solid #dbe4ef;
  border-radius: 999px;
  padding: 9px 13px;
  background: #fff;
  color: #0f172a;
  font-weight: 900;
  white-space: nowrap;
}

.v50-filters button.active {
  background: #0b3b75;
  color: #fff;
}

.v50-mode {
  display: grid;
  gap: 8px;
}

.v50-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #dbe4ef;
  border-radius: 16px;
  background: #f8fafc;
  font-weight: 850;
}

.v50-radio input {
  width: 20px;
  height: 20px;
}

.v50-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.v50-stat {
  border: 1px solid #dbe4ef;
  border-radius: 16px;
  padding: 12px;
  background: #f8fafc;
  min-width: 0;
}

.v50-stat strong {
  display: block;
  font-size: 24px;
  color: #0b3b75;
}

.v50-stat span {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.v50-actions {
  display: grid;
  gap: 10px;
}

.v50-actions button {
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 14px 12px;
  font-size: 16px;
  font-weight: 950;
  min-height: 52px;
}

.v50-actions .yellow { background: #f59e0b; color: #1f1600; }
.v50-actions .blue { background: #0b3b75; color: #fff; }
.v50-actions .soft { background: #eef4fb; color: #0f172a; }
.v50-actions .danger { background: #fee2e2; color: #991b1b; }

.v50-note {
  background: #fff7ed;
  color: #7c2d12;
  border-radius: 16px;
  padding: 12px;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.v50-ok {
  background: #ecfdf5;
  color: #065f46;
}

.v50-mini {
  font-size: 12px !important;
  color: #64748b !important;
}

@media (max-width: 420px) {
  .panel-view {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .panel-head {
    gap: 8px !important;
  }

  .panel-head h2 {
    font-size: 26px !important;
  }

  .v50-selection-bar {
    grid-template-columns: 1fr auto auto;
    gap: 7px;
    padding: 8px;
  }

  .v50-selection-count {
    grid-column: 1 / -1;
  }

  .v50-selection-bar button {
    padding: 8px 9px;
    font-size: 13px;
  }

  .v50-summary-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .v50-card {
    padding: 14px;
    border-radius: 20px;
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  .v50-report {
    max-width: none;
  }

  .v50-summary-grid {
    grid-template-columns: repeat(4, minmax(0,1fr));
  }

  .v50-actions {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}


/* =========================================================
   V52 - APK PREPARACION FINAL
   Timemark neutro + preview + responsive final
   ========================================================= */

body.v52-ready .wm-meta::before {
  content: "";
}

body.v52-ready #watermark {
  max-width: calc(100vw - 28px);
  overflow: hidden;
}

body.v52-ready .wm-main {
  align-items: flex-start !important;
  flex-direction: column !important;
  gap: 5px !important;
}

body.v52-ready .wm-main strong {
  display: block !important;
  font-size: clamp(42px, 12vw, 64px) !important;
  line-height: .86 !important;
  max-width: 100% !important;
}

body.v52-ready .wm-main span {
  display: block !important;
  font-size: clamp(14px, 4vw, 18px) !important;
  line-height: 1.15 !important;
  max-width: 100% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.v52-ready .wm-address {
  white-space: normal !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  line-height: 1.22 !important;
}

body.v52-ready .wm-meta {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.v52-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(2, 6, 23, .88);
  display: none;
  padding: calc(14px + env(safe-area-inset-top,0px)) 14px calc(14px + env(safe-area-inset-bottom,0px));
  color: #fff;
}

.v52-preview-modal.show {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
}

.v52-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.v52-preview-head strong {
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v52-preview-close {
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  width: 42px;
  height: 42px;
  font-size: 24px;
  font-weight: 950;
}

.v52-preview-stage {
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.v52-preview-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0,0,0,.42);
}

.v52-preview-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.v52-preview-actions button {
  min-height: 48px;
  border: 0;
  border-radius: 16px;
  font-weight: 950;
  font-size: 15px;
}

.v52-preview-actions .blue {
  background: #0b3b75;
  color: #fff;
}

.v52-preview-actions .yellow {
  background: #f59e0b;
  color: #1f1600;
}

.v52-preview-actions .danger {
  background: #fee2e2;
  color: #991b1b;
}

.v52-preview-actions .soft {
  background: #eef4fb;
  color: #0f172a;
}

@media (orientation: landscape) and (max-height: 540px) {
  .v52-preview-modal.show {
    grid-template-columns: 1fr 290px;
    grid-template-rows: auto 1fr;
  }
  .v52-preview-head {
    grid-column: 1 / -1;
  }
  .v52-preview-actions {
    grid-template-columns: 1fr;
    align-content: center;
  }
}

@media (max-width: 420px) {
  body.v52-ready .watermark {
    padding: 10px 12px !important;
  }
  .v52-preview-actions {
    grid-template-columns: 1fr 1fr;
  }
}
