/* =========================================
   ULTRON UI - SUPERVISOR (v51.0 FINAL)
   Theme: Neon Command (Unified)
   ========================================= */
:root {
  --bg-deep: #070b11;
  --bg-soft: #0e141d;
  --panel: #121a24;
  --panel-strong: #161f2b;
  --neon: #00ff41;
  --danger: #ff3333;
  --warning: #ffcc00;
  --info: #00f3ff;
  --text: #f5f7f8;
  --text-soft: #a5adb4;
  --border: #1f2935;
  --header-bg: #0c1119;
  --header-height: 60px;
  --sidebar-width: 260px;
  --max-content-width: 1200px;
  --base-font-size: 12px;
  --font-main: 'Space Grotesk', 'Sora', sans-serif;
}

html {
  font-size: var(--base-font-size);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
}

body {
  background-color: var(--bg-deep);
  background-image: radial-gradient(circle at 12% 10%, rgba(0, 255, 65, 0.12), transparent 45%),
    radial-gradient(circle at 88% 12%, rgba(0, 243, 255, 0.1), transparent 45%),
    radial-gradient(circle at 90% 90%, rgba(255, 51, 51, 0.08), transparent 40%),
    linear-gradient(180deg, rgba(7, 11, 17, 0.9), rgba(4, 7, 11, 0.98));
  color: var(--text);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 12, 18, 0.05), rgba(0, 0, 0, 0.8));
  pointer-events: none;
  z-index: 0;
}

/* --- HEADER UNIFICADO --- */
/* HEADER */
header {
  background: var(--header-bg);
  border-right: 1px solid var(--border);
  padding: 24px 18px;
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 20px;
  z-index: 2000;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.55);
  transition: width 0.3s ease;
}

header h1 {
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

header h1::before {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: var(--neon);
  box-shadow: 0 0 12px rgba(0, 255, 65, 0.7);
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

#sidebar-toggle {
  background: transparent;
  border: none;
  color: var(--text-soft);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  transition: 0.2s;
}

#sidebar-toggle:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

/* SIDE NAV */
.side-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-soft);
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: 0.2s ease;
  background: transparent;
  border: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  width: 100%;
  justify-content: flex-start;
}

.side-link i {
  color: var(--neon);
  opacity: 0.75;
  min-width: 20px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  /* Explicit Default Size */
}

.side-link:hover,
.side-link.active {
  color: #fff;
  background: rgba(0, 255, 65, 0.12);
  box-shadow: inset 0 0 0 1px rgba(0, 255, 65, 0.2);
}

/* FOOTER BUTTONS */
.header-actions {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid #333;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-buttons-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.btn-account,
.btn-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
  font-size: 0.8rem;
  color: #fff;
  background: transparent;
  white-space: nowrap;
  width: 100%;
}

.btn-account {
  background: rgba(6, 10, 14, 0.9);
  border: 1px solid var(--neon);
  color: var(--neon);
}

.btn-account:hover {
  background: var(--neon);
  color: #000;
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.4);
}

.btn-logout {
  background: linear-gradient(180deg, #2a0e0e, #1a0505);
  border: 1px solid var(--danger);
  color: var(--danger);
}

.btn-logout:hover {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 51, 51, 0.4);
}

.user-avatar-small {
  width: 24px;
  height: 24px;
  background: #333;
  color: #fff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.65rem;
  font-weight: bold;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.pill {
  background: rgba(6, 10, 14, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  color: #fff;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

/* SIDEBAR COLLAPSED */
body.sidebar-collapsed header {
  width: 72px;
  /* Reduced to 72px */
  padding: 24px 0;
  align-items: center;
  transition: width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  /* Smoother */
}

body.sidebar-collapsed .header-top {
  justify-content: center;
  padding: 0;
  width: 100%;
}

body.sidebar-collapsed #sidebar-toggle {
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

body.sidebar-collapsed header h1,
body.sidebar-collapsed .side-link span {
  display: none !important;
}

/* Initials Logic for #who - HIDDEN BY USER REQUEST */
body.sidebar-collapsed #who {
  display: none !important;
}

body.sidebar-collapsed #who::before {
  content: attr(data-initials);
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--text-soft);
  display: block;
}

body.sidebar-collapsed header h1::before {
  display: block;
  margin: 0 auto;
}

body.sidebar-collapsed .side-nav {
  width: 100%;
  align-items: center;
}

body.sidebar-collapsed .side-link {
  justify-content: center;
  padding: 10px;
  /* Adjusted padding */
  width: 42px;
  height: 42px;
  border-radius: 10px;
}

body.sidebar-collapsed .side-link i {
  margin: 0;
  font-size: 1.2rem;
  /* Explicit Collapsed Size */
}

body.sidebar-collapsed .header-actions {
  width: 100%;
  align-items: center;
  border-top: none;
  padding-top: 10px;
}

body.sidebar-collapsed .footer-buttons-container {
  gap: 10px;
  /* Reduced gap */
  align-items: center;
}

body.sidebar-collapsed .btn-account,
body.sidebar-collapsed .btn-logout {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  /* Default round for account */
  justify-content: center;
  font-size: 12.25px !important;
  /* Precision micro-adjustment: 12.25px */
  line-height: 1;
}

body.sidebar-collapsed .btn-logout {
  border-radius: 10px !important;
}

body.sidebar-collapsed .btn-account span,
body.sidebar-collapsed .btn-logout span {
  display: none;
}

body.sidebar-collapsed main {
  margin-left: 72px;
  /* Match width */
  padding-left: 2rem;
  transition: margin-left 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* MOBILE RESPONSIVE TOP BAR */
@media (max-width: 768px) {
  body {
    padding-top: 60px;
    overflow-y: auto !important;
  }

  /* Reset Main Layout */
  main,
  body.sidebar-collapsed main {
    margin-left: 0 !important;
    padding: 20px 16px !important;
    width: 100% !important;
    padding-top: 80px !important;
  }

  /* Header */
  header {
    width: 100% !important;
    height: 60px !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    padding: 0 10px !important;
    align-items: center !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  }

  header h1,
  .header-top {
    display: none !important;
  }

  /* Hide Sidebar Toggle on Mobile (Portal style) */
  #sidebar-toggle {
    display: none !important;
  }

  /* Side Nav becomes Top Nav - ALIGN LEFT */
  .side-nav {
    flex-direction: row !important;
    align-items: center !important;
    width: auto !important;
    gap: 8px !important;
    margin-left: 0 !important;
    margin-right: auto !important;
  }

  .side-link {
    width: auto !important;
    height: auto !important;
    padding: 8px !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .side-link i {
    font-size: 1.2rem !important;
    margin: 0 !important;
  }

  .side-link span {
    display: none !important;
  }

  .side-link.active i {
    color: #fff;
    text-shadow: 0 0 10px var(--neon);
  }

  /* Actions - SHOW RIGHT */
  .header-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    width: auto !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
    gap: 8px !important;
  }

  #who {
    display: none !important;
  }

  .footer-buttons-container {
    flex-direction: row !important;
    gap: 8px !important;
    width: auto !important;
  }

  .btn-account,
  .btn-logout {
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    border-radius: 8px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 1rem !important;
  }

  .btn-account span,
  .btn-logout span {
    display: none !important;
  }

  /* Filter Bar Mobile Safety (Generic) */
  .filter-bar,
  .plan-list-header {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
  }
}

/* MAIN */
main {
  margin-left: var(--sidebar-width);
  height: 100vh;
  padding-top: 2rem;
  padding-right: 2.5rem;
  padding-bottom: 2.5rem;
  padding-left: 2.5rem;
  width: auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  transition:
    padding-left 0.3s ease,
    margin-left 0.3s ease;
}

/* Tab navigation remains below */

/* Tabs */
.tab-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
  flex-shrink: 0;
  flex-wrap: wrap;
  max-width: var(--max-content-width);
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.tab-pane {
  display: none;
  height: 100%;
}

.tab-pane.active {
  display: flex;
  flex-direction: column;
  max-width: var(--max-content-width);
  margin: 0 auto;
  width: 100%;
}

/* Paneles */
.panel-container {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 15px;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.instructions-panel {
  flex: 0 0 auto !important;
  height: auto !important;
  min-height: unset !important;
  margin-bottom: 20px;
  background: linear-gradient(90deg, #101924 0%, #0a0e14 100%);
  border-left: 4px solid var(--neon);
  padding: 15px 20px;
}

.instructions-panel .section-title {
  font-size: 1rem;
  margin-bottom: 5px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.instructions-panel .helper-text {
  font-size: 0.95rem;
  color: #e2e8f0;
  margin-bottom: 0;
  line-height: 1.4;
}

.cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  height: 100%;
  overflow: hidden;
}

.flex-col {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.center-content {
  justify-content: center;
  align-items: center;
}

/* Planificar: guia y estructura */
.plan-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.guide-step {
  display: flex;
  gap: 12px;
  background: rgba(10, 14, 20, 0.85);
  border: 1px solid rgba(0, 255, 65, 0.12);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.guide-step h4 {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.6px;
  margin-bottom: 4px;
}

.guide-step p {
  color: var(--text-soft);
  font-size: 0.8rem;
  line-height: 1.3;
}

.guide-index {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(0, 255, 65, 0.5);
  color: var(--neon);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.85rem;
  flex-shrink: 0;
  box-shadow: inset 0 0 12px rgba(0, 255, 65, 0.2);
}

.plan-list-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.plan-list-header .section-title {
  margin-bottom: 4px;
  border-bottom: none;
  padding-bottom: 0;
}

#tab-planificar .right-col {
  overflow: visible;
  position: relative;
  padding-bottom: 220px;
}

.plan-list-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

#btn-project-more {
  display: none;
}

.plan-list-footer {
  margin-top: 8px;
  text-align: right;
}

.pill-outline {
  border: 1px solid rgba(0, 255, 65, 0.4);
  color: var(--neon);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.box-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.helper-text {
  color: var(--text-soft);
  font-size: 0.8rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.section-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ghost-pill {
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e5e7eb;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background: rgba(8, 12, 18, 0.85);
}

.search-input {
  margin: 6px 0 10px;
}

.email-panel {
  background: rgba(8, 12, 18, 0.9);
  border: 1px solid rgba(0, 255, 65, 0.12);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

.email-input {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  margin: 8px 0 10px;
  background: rgba(6, 10, 14, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
}

.email-input:focus {
  border-color: rgba(0, 255, 65, 0.5);
  box-shadow: 0 0 12px rgba(0, 255, 65, 0.2);
}

.email-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.email-results {
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  background: rgba(6, 10, 14, 0.6);
}

.email-task {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(8, 12, 18, 0.95);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.email-task.matched {
  border-color: rgba(0, 255, 65, 0.45);
}

.email-task.missing {
  border-color: rgba(255, 204, 0, 0.5);
}

.email-task-title {
  font-weight: 800;
  color: #fff;
  font-size: 0.9rem;
}

.email-task-meta {
  color: var(--text-soft);
  font-size: 0.8rem;
}

.email-task-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.email-task-actions select {
  flex: 1 1 180px;
  min-width: 160px;
}

.item-label.recommended {
  border-color: rgba(0, 255, 65, 0.45);
  box-shadow: inset 0 0 12px rgba(0, 255, 65, 0.08);
}

.selection-queue {
  background: rgba(10, 16, 22, 0.92);
  border: 1px solid rgba(0, 243, 255, 0.4);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 0 18px rgba(0, 243, 255, 0.2);
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: min(400px, 95vw);
  /* Wider */
  max-height: 60vh;
  z-index: 2500;
  backdrop-filter: blur(8px);
  display: flex;
  /* Hidden by default, toggled by JS */
  flex-direction: column;
  /* Ensure vertical layout */
}

.selection-queue .box-title {
  margin-bottom: 10px;
  font-size: 0.85rem;
  color: var(--neon);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.selection-queue li {
  padding: 8px 10px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  font-size: 0.85rem;
  line-height: 1.3;
  color: #e0e0e0;
}

.selection-queue li:last-child {
  border-bottom: none !important;
}

.queue-body {
  flex: 1;
  overflow-y: auto;
  /* Scroll here */
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #000;
  border-radius: 8px;
  width: 100%;
}

/* Scrollbar styling for this box specifically if needed */
.queue-body::-webkit-scrollbar {
  width: 6px;
}

.queue-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.queue-body::-webkit-scrollbar-thumb:hover {
  background: var(--neon);
}

.queue-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.queue-body {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(6, 10, 14, 0.75);
  padding: 6px;
  max-height: 180px;
  overflow-y: auto;
}

.selection-queue .mini-list {
  margin-bottom: 0;
  border: none;
  padding: 0;
  max-height: none;
}

.btn-mid.green {
  border-color: var(--neon);
  color: var(--neon);
}

.btn-mid.green:hover {
  background: var(--neon);
  color: #000;
}

/* === Responsive: Mobile / Small screens === */
@media (max-width: 768px) {
  :root {
    --header-height: 48px;
  }

  html {
    font-size: 11px;
  }

  /* Header compact */
  header {
    height: var(--header-height);
    min-height: var(--header-height);
    padding: 0.35rem 0.75rem;
  }

  header h1 {
    font-size: 1.05rem;
  }

  /* Make header actions compact and wrap */
  .header-actions {
    gap: 8px;
    flex-wrap: wrap;
  }

  /* Show user/role pill but reduced sizing */
  header .pill,
  #who {
    display: inline-block !important;
    padding: 4px 8px !important;
    font-size: 0.8rem !important;
    white-space: nowrap;
  }

  .btn-account,
  .btn-logout {
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  /* Main becomes full height minus header, scrolling container */
  main {
    margin-top: var(--header-height);
    height: calc(100vh - var(--header-height));
    padding: 8px;
  }

  /* Tabs horizontally scrollable and left-aligned */
  .tab-nav {
    justify-content: flex-start;
    gap: 8px;
    padding: 6px 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tab-link {
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  /* Panels stack vertically */
  .cols-2 {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .panel-container {
    padding: 10px;
  }

  .plan-guide {
    grid-template-columns: 1fr;
  }

  .plan-list-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .plan-list-meta {
    flex-direction: row;
    align-items: center;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-meta {
    justify-content: flex-start;
  }

  .lightbox-content {
    height: min(60vh, 520px);
  }

  .email-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .email-results {
    max-height: 200px;
  }

  .queue-body {
    max-height: 160px;
  }

  .selection-queue {
    left: 12px;
    right: 12px;
    width: auto;
    bottom: calc(12px + env(safe-area-inset-bottom));
  }

  #tab-planificar .right-col {
    padding-bottom: 260px;
  }

  /* Reduce card sizes and spacing */
  .project-list-container,
  .panel-container {
    border-radius: 8px;
  }

  .scroll-box {
    padding-right: 10px;
  }

  /* Modals and wide elements should adapt */
  .modal-content.wide-modal {
    width: 95%;
    max-width: 600px;
  }

  .exif-modal .preview-img {
    height: 180px;
  }

  /* Reportes */
  #tab-reportes .panel-container {
    align-items: stretch;
    padding: 12px;
    justify-content: flex-start;
  }

  #tab-reportes .report-card {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
  }

  #tab-reportes .section-title {
    text-align: left;
  }

  #tab-reportes .form-actions .btn-principal {
    padding: 10px;
    font-size: 0.9rem;
  }
}

/* Scroll & Listas */
.scroll-box {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding-right: 5px;
}

.project-list-container {
  border: 1px solid #333;
  border-radius: 8px;
  padding: 10px;
  background: #000;
}

#project-list,
#selected-items-list {
  list-style: none;
  padding-left: 0;
}

#project-list li {
  padding: 8px 12px;
  border-bottom: 1px solid #222;
  cursor: pointer;
  font-weight: 600;
  color: #ccc;
  transition: 0.2s;
  font-size: 0.9rem;
}

#project-list li:hover {
  color: #fff;
  background: #111;
}

#project-list li.active {
  color: var(--neon);
  background: #0a150a;
  border-left: 3px solid var(--neon);
}

/* Elementos UI */
.control-box {
  background: #000;
  padding: 15px;
  border: 1px solid var(--neon);
  border-radius: 8px;
  margin-bottom: 15px;
  flex-shrink: 0;
}

.box-title {
  color: #fff;
  margin-bottom: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.section-title {
  color: #fff;
  margin-bottom: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  border-bottom: 1px solid #222;
  padding-bottom: 5px;
}

.flex-row-between .section-title {
  flex: 1;
  width: 100%;
}

.project-group-header {
  background: #0a0a0a;
  border-left: 2px solid var(--neon);
  padding: 6px 10px;
  margin: 12px 0 4px 0;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #222;
}

.input-group {
  display: flex;
  gap: 10px;
}

.mini-list {
  max-height: 100px;
  border: 1px solid #333;
  padding: 5px;
  margin-bottom: 10px;
}

.empty-msg {
  color: #666;
  text-align: center;
  padding-top: 20px;
}

.neon-text {
  color: var(--neon);
}

.danger-text {
  color: var(--danger);
}

.bold {
  font-weight: bold;
}

.danger-border {
  border-color: var(--danger);
}

.validar-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 10px;
}

#tab-validar .panel-container.danger-border .quarantine-header,
#tab-validar .panel-container.danger-border .category-header {
  border-color: var(--danger);
  background: rgba(255, 51, 51, 0.08);
}

#tab-validar .panel-container.danger-border .category-header:hover,
#tab-validar .panel-container.danger-border .quarantine-header:hover {
  background: rgba(255, 51, 51, 0.14);
}

#tab-validar .panel-container.danger-border .item-sublist {
  border-left-color: rgba(255, 51, 51, 0.35);
}

#tab-validar .panel-container.danger-border .btn-tiny.green {
  border-color: var(--danger);
  color: var(--danger);
}

#tab-validar .panel-container.danger-border .btn-tiny.green:hover {
  background: var(--danger);
  color: #fff;
}

#tab-validar .panel-container.danger-border {
  background: linear-gradient(180deg, rgba(255, 51, 51, 0.08), rgba(0, 0, 0, 0.35));
  box-shadow: 0 0 24px rgba(255, 51, 51, 0.18);
}

#tab-validar .panel-container.danger-border .section-title {
  color: var(--danger);
  border-bottom-color: rgba(255, 51, 51, 0.35);
}

/* Reportes */
#tab-reportes .panel-container {
  justify-content: center;
  align-items: center;
}

#tab-reportes .report-card {
  width: min(620px, 100%);
  background: #060606;
  border: 1px solid #1e1e1e;
  border-radius: 14px;
  padding: 22px;
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.6),
    inset 0 0 0 1px rgba(0, 255, 65, 0.05);
}

#tab-reportes .report-form {
  display: grid;
  gap: 12px;
}

#tab-reportes .form-group {
  display: grid;
  gap: 8px;
}

#tab-reportes .form-group label {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #ccc;
  letter-spacing: 0.5px;
}

#tab-reportes .section-title {
  margin-bottom: 14px;
}

#tab-reportes .form-actions {
  margin-top: 4px;
}

#tab-reportes .form-actions .btn-principal {
  width: 100%;
}

/* Acordeones */
.category-header,
.quarantine-header {
  background: #000;
  border: 1px solid var(--neon);
  padding: 8px 12px;
  /* Reduced from 12px 15px */
  margin-bottom: 5px;
  cursor: pointer;
  font-weight: 700;
  /* Reduced from 900 */
  text-transform: uppercase;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 6px;
  transition: 0.2s;
  font-size: 0.85rem;
  /* Ensure consistent font size */
  min-height: 40px;
  /* Enforce min-height */
}

/* Level 0: Plan (Green/Neon) */
.category-header.color-0 {
  border-color: var(--neon);
  color: #fff;
}

/* Level 1: Project (White/Subtle) - Make it same size but visually distinct */
.category-header.color-1 {
  border-color: #444;
  /* More subtle border */
  font-size: 0.85rem;
  padding: 8px 12px;
  /* Enforce same padding */
  min-height: 40px;
  /* Enforce same height */
}

.category-header:hover {
  background: #0f1a0f;
}

.category-header.collapsed,
.quarantine-header.collapsed {
  opacity: 0.7;
  border-color: #333;
}

.quarantine-group {
  margin-bottom: 15px;
  border: 1px solid var(--danger);
  border-radius: 8px;
  overflow: hidden;
}

.quarantine-header {
  border-color: var(--danger);
  background: rgba(255, 51, 51, 0.1);
}

.item-sublist {
  margin-left: 10px;
  padding: 5px;
  border-left: 2px solid #222;
  margin-bottom: 10px;
}

.item-sublist.hidden {
  display: none;
}

/* Filas */
.split-row,
.file-row,
.item-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(8, 12, 18, 0.9);
  border: 1px solid var(--border);
  padding: 8px 12px;
  gap: 15px;
  margin-bottom: 2px;
  border-radius: 8px;
}

.file-row {
  border: 1px solid #333;
  margin-bottom: 5px;
  padding: 5px;
}

.col-name {
  flex: 1;
  color: #fff;
  font-weight: 500;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.col-actions {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
  align-items: center;
}

.flex-row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 10px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin-bottom: 10px;
  min-height: 35px;
}

.panel-header .section-title {
  margin-bottom: 0;
  flex: 1;
  width: 100%;
}

/* Inputs */
input,
select {
  width: 100%;
  background: #000 !important;
  border: 1px solid #444 !important;
  color: #fff !important;
  padding: 8px 10px;
  border-radius: 6px;
  outline: none;
  font-size: 0.9rem;
  font-weight: 600;
}

input:focus,
select:focus {
  border-color: var(--neon) !important;
}

/* Botones */
.btn-borrar,
.btn-reject,
.btn-peligro {
  display: inline-block;
  padding: 10px;
  background: transparent;
  border: 2px solid var(--danger);
  color: var(--danger);
  font-weight: 800;
  text-transform: uppercase;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
  font-size: 0.8rem;
}

.btn-borrar:hover {
  background: var(--danger);
  color: #fff;
}

.btn-tiny {
  padding: 4px 8px;
  font-size: 0.7rem;
  width: auto !important;
  border-width: 1px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  background: #000;
  cursor: pointer;
}

.btn-tiny.green {
  border-color: var(--neon);
  color: var(--neon);
}

.btn-tiny.green:hover {
  background: var(--neon);
  color: #000;
}

.btn-tiny.red {
  border-color: var(--danger);
  color: var(--danger);
}

.btn-tiny.red:hover {
  background: var(--danger);
  color: #fff;
}

.btn-tiny.blue {
  border-color: var(--info);
  color: var(--info);
}

.btn-tiny.blue:hover {
  background: var(--info);
  color: #000;
}

.btn-mid {
  padding: 6px 12px;
  font-size: 0.75rem;
  width: auto !important;
  border: 1px solid var(--info);
  color: var(--info);
  background: #000;
  cursor: pointer;
  border-radius: 4px;
}

.btn-mid.blue {
  border-color: var(--info);
  color: var(--info);
}

.btn-mid.blue:hover {
  background: var(--info);
  color: #000;
}

.btn-mid.red {
  border-color: #ff6b6b;
  color: #ff6b6b;
}

.btn-mid.red:hover {
  background: #ff6b6b;
  color: #000;
}

.auto-width {
  width: auto !important;
}

/* PAGINATION FIXES */
#project-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  padding-top: 10px;
}

.pagination-info {
  font-size: 0.85rem;
  color: #8b949e;
  font-weight: 600;
}

#project-pagination .btn-tiny {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 32px !important;
  height: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  font-size: 0.9rem;
}

#project-pagination .btn-tiny:hover:not(:disabled) {
  border-color: var(--neon);
  color: var(--neon);
  background: rgba(0, 255, 65, 0.1);
}

#project-pagination .btn-tiny:disabled {
  border-color: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.2);
  cursor: default;
}

/* Estados */
[class^='status-'] {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  border: 1px solid;
  background: #000;
}

.status-VALIDADA {
  border-color: var(--neon);
  color: var(--neon);
}

.status-PENDIENTE_EXIF {
  border-color: var(--warning);
  color: var(--warning);
}

.status-COMPLETADA_TERRENO {
  border-color: #fff;
  color: #fff;
}

/* MODALES */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  display: none;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: linear-gradient(160deg, rgba(12, 18, 28, 0.96), rgba(8, 12, 18, 0.98));
  border: 1px solid var(--border);
  padding: 25px;
  border-radius: 16px;
  width: 95%;
  max-width: 600px;
  max-height: 95vh;
  overflow-y: auto;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.55),
    0 0 35px rgba(0, 255, 65, 0.12);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  align-items: center;
}

.modal-header h2 {
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.2rem;
  margin: 0;
}

.modal-close-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}

.modal-subtitle {
  margin: 6px 0 10px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.modal-filename {
  display: block;
  margin-top: 6px;
  color: #fff;
  font-weight: 700;
  word-break: break-all;
}

.modal-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

#add-items-list-container {
  border: 1px solid var(--border);
  background: rgba(8, 12, 18, 0.85);
  border-radius: 12px;
  padding: 10px;
}

.exif-modal {
  width: min(92vw, 720px);
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.exif-preview {
  background: linear-gradient(180deg, rgba(10, 14, 20, 0.95), rgba(6, 10, 14, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: inset 0 0 12px rgba(0, 255, 65, 0.08);
}

.exif-modal .preview-img {
  height: 260px;
  max-height: 50vh;
  margin-bottom: 0;
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 65, 0.25);
  background: #000;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.exif-modal .field {
  margin-bottom: 0;
}

.exif-modal .modal-footer-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 700px) {
  .exif-modal .modal-footer-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* MODALES (Strict Portal Copy) */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: none;
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s;
}

.modal-content {
  background: rgba(12, 16, 22, 0.85);
  backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 30px;
  border-radius: 20px;
  width: 95%;
  max-width: 600px;
  max-height: 95vh;
  overflow-y: auto;
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.6),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid #333;
  padding-bottom: 10px;
  align-items: center;
}

.modal-header h2 {
  color: #fff;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 1.2rem;
  margin: 0;
}

.modal-close-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}

/* Modal Clave */
/* Modal Clave (Strict Portal Copy) */
#modal-change-password .modal-content {
  max-width: 450px;
  padding: 30px;
}

/* Fields Scoped */
#modal-change-password .field {
  text-align: left;
}

#modal-change-password .field label {
  display: block;
  color: #ffffff;
  font-size: 0.8rem;
  margin-bottom: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

#modal-change-password .field input,
#modal-change-password .field select {
  width: 100%;
  background: rgba(8, 12, 18, 0.9);
  border: 1px solid #263140;
  color: #fff;
  padding: 12px;
  min-height: 44px;
  border-radius: 8px;
  outline: none;
  transition: 0.3s;
  font-weight: 600;
  font-size: 0.95rem;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none;
}

#modal-change-password .field input:focus,
#modal-change-password .field select:focus {
  border-color: var(--neon);
  box-shadow: 0 0 15px rgba(0, 255, 65, 0.2);
}

.btn-principal {
  display: inline-block;
  padding: 10px 15px;
  background: #000;
  border: 2px solid var(--neon);
  color: var(--neon);
  font-weight: 800;
  text-transform: uppercase;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  font-size: 0.8rem;
  min-width: 100px;
  transition: 0.3s;
  letter-spacing: normal;
  width: auto;
  /* Reset width */
}

.btn-principal:hover {
  background: var(--neon);
  color: #000;
  box-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-footer {
  margin-top: 20px;
  text-align: center;
}

.modal-status {
  margin: 10px 0;
  font-weight: bold;
  text-align: center;
  min-height: 20px;
}

.modal-status.loading {
  color: #fff;
}

.modal-status.error {
  color: var(--danger);
}

.modal-status.success {
  color: var(--neon);
}

/* Fotos */
.file-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border: 1px solid #444;
  cursor: pointer;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  padding: 10px;
  background: #000;
  border: 1px solid #333;
}

.report-photo-card {
  position: relative;
  border: 1px solid #444;
  border-radius: 4px;
  overflow: hidden;
  background: #000;
}

.preview-img {
  width: 100%;
  height: 250px;
  object-fit: contain;
  background: #000;
  margin-bottom: 15px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

/* Lightbox */
#lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(6, 9, 13, 0.96);
  z-index: 99999;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 18px;
  gap: 14px;
  backdrop-filter: blur(10px);
}

.lightbox-content {
  display: flex;
  flex-direction: column;
  /* Changed from default row/center */
  justify-content: center;
  align-items: center;
  width: min(800px, 94vw);
  /* Reduced width for better portrait feel */
  height: auto;
  max-height: 90vh;
  /* Allow it to grow but cap at viewport */
  position: relative;
  background: linear-gradient(160deg, rgba(12, 18, 28, 0.98), rgba(8, 12, 18, 0.99));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  gap: 15px;
  /* Space between image and buttons */
  box-shadow:
    0 18px 35px rgba(0, 0, 0, 0.55),
    0 0 24px rgba(0, 255, 65, 0.08);
}

.lightbox-content img,
.lightbox-content video {
  max-width: 100%;
  max-height: 70vh;
  /* Limit image height to leave room for buttons */
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 65, 0.25);
  background: #000;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
  flex: 1;
  /* Allow it to take available space */
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(12, 18, 26, 0.85);
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  z-index: 3001;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s ease;
}

.lightbox-nav-btn:hover {
  border-color: rgba(0, 255, 65, 0.5);
  color: var(--neon);
  box-shadow: 0 0 18px rgba(0, 255, 65, 0.35);
}

.lb-close-btn {
  position: absolute;
  top: 18px;
  right: 20px;
  background: rgba(12, 18, 26, 0.85);
  border: 1px solid rgba(255, 51, 51, 0.6);
  color: var(--danger);
  font-size: 2rem;
  font-weight: 600;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
  z-index: 100000;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s ease;
}

.lb-close-btn:hover {
  color: #fff;
  background: var(--danger);
  box-shadow: 0 0 16px rgba(255, 51, 51, 0.45);
}

.lb-prev {
  left: 14px;
}

.lb-next {
  right: 14px;
}

.lightbox-footer {
  display: flex;
  gap: 16px;
  width: 100%;
  justify-content: center;
  margin-top: 0;
}

.lightbox-footer button {
  width: auto !important;
  min-width: 120px;
  padding: 10px 20px;
}

/* Loader */
#global-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 3000;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #fff;
}

.loader-spinner {
  width: 60px;
  height: 60px;
  border: 5px solid #222;
  border-top: 5px solid var(--neon);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Responsive Celular */
@media (max-width: 768px) {
  .cols-2 {
    grid-template-columns: 1fr;
  }

  .tab-nav {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .tab-link {
    min-width: 100px;
  }

  .panel-container {
    padding: 10px;
  }

  .header-actions button {
    padding: 6px 12px;
    font-size: 0.7rem;
  }
}

.modal-footer .btn-square input {
  accent-color: var(--neon);
  /* Color del check nativo */
  cursor: pointer;
}

.modal-footer .btn-square:hover {
  background: #111;
  border-color: #fff;
  color: #fff;
}

.item-label {
  display: flex !important;
  justify-content: flex-start !important;
  align-items: center !important;
  background: rgba(8, 12, 18, 0.9);
  border: 1px solid var(--border);
  padding: 8px 12px !important;
  gap: 12px !important;
  margin-bottom: 2px;
  border-radius: 8px;
}

/* Checkbox Grande */
.item-label input[type='checkbox'] {
  width: 24px !important;
  height: 24px !important;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--neon);
  margin: 0 !important;
}

/* Texto del Item */
.item-label label {
  flex-grow: 1;
  cursor: pointer;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: normal;
  /* Permite que el texto baje si es largo */
  text-align: left;
}

/* [DUPLICATE BLOCK REMOVED] */

/* SMART PLANNER STYLES - FIXED & PREMIUM GLASS */
.smart-planner-container {
  display: flex;
  gap: 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 15px 20px;
  margin-bottom: 20px;
  align-items: center;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  height: auto;
  min-height: 120px;
  transition: all 0.2s ease;
}

.smart-planner-container:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.planner-left {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* Cleaned: Styles inherited from container */
  padding: 0;
}

.planner-input {
  width: 100%;
  min-height: 80px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 10px;
  color: #e2e8f0;
  font-size: 0.9rem;
  resize: none;
  transition: border-color 0.2s;
}

.planner-input:focus {
  border-color: var(--neon);
  outline: none;
  background: rgba(0, 0, 0, 0.4);
}

.planner-center {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neon);
  font-size: 1.5rem;
  opacity: 0.8;
}

.planner-right {
  flex: 1.5;
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.planner-label {
  font-size: 0.75rem;
  color: #8b949e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.planner-name-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.95rem;
  padding: 5px 0;
  text-align: center;
}

.planner-actions {
  display: flex;
  gap: 10px;
  margin-top: 5px;
}

.planner-actions button {
  flex: 1;
  font-size: 0.8rem;
  padding: 8px;
}

/* BTN TINY FIX */
.btn-tiny {
  font-size: 0.7rem;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.btn-tiny.neon {
  background: rgba(0, 255, 65, 0.1);
  border-color: var(--neon);
  color: var(--neon);
}

.btn-tiny.neon:hover {
  box-shadow: 0 0 10px rgba(0, 255, 65, 0.4);
}

/* REPORTS UI - STANDARD CARDS */
.report-selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  width: 100%;
  margin-bottom: 25px;
}

.report-type-card {
  background: linear-gradient(145deg, rgba(16, 22, 32, 0.9), rgba(8, 12, 18, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 25px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.report-type-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: transparent;
  transition: 0.3s;
}

.report-type-card:hover {
  transform: translateY(-5px);
  box-shadow:
    0 15px 30px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(0, 255, 65, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.report-type-card:hover::before {
  background: var(--neon);
  box-shadow: 0 0 10px var(--neon);
}

.report-type-card.active {
  background: linear-gradient(145deg, rgba(8, 28, 18, 0.95), rgba(6, 12, 8, 0.98));
  border-color: var(--neon);
  box-shadow:
    0 0 0 1px rgba(0, 255, 65, 0.3),
    0 20px 40px rgba(0, 0, 0, 0.6);
}

.report-type-card.active::before {
  background: var(--neon);
  box-shadow: 0 0 15px var(--neon);
}

.report-type-card i {
  font-size: 2.2rem;
  color: var(--text-soft);
  margin-bottom: 5px;
  transition: 0.3s;
}

.report-type-card:hover i,
.report-type-card.active i {
  color: var(--neon);
  transform: scale(1.1);
  text-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
}

.report-type-card h3 {
  font-size: 1.1rem;
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
}

.report-type-card p {
  font-size: 0.8rem;
  color: #8b949e;
  text-align: center;
  line-height: 1.4;
  max-width: 90%;
}

.report-config-panel {
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 25px;
  border-radius: 12px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.input-dark {
  background: rgba(6, 10, 14, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
  transition: 0.2s;
  -webkit-appearance: none;
  /* Fix for browser default styling */
}

.input-dark:focus {
  border-color: var(--neon);
  box-shadow: 0 0 10px rgba(0, 255, 65, 0.15);
}

.report-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 300px;
}

.report-input-group label {
  font-size: 0.8rem;
  color: var(--text-soft);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.report-actions {
  width: 100%;
  display: flex;
  justify-content: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
  margin-top: 10px;
}

.btn-tiny.blue {
  background: rgba(0, 200, 255, 0.1);
  border-color: #00ccff;
  color: #00ccff;
}

.btn-tiny.blue:hover {
  background: #00ccff;
  color: #000;
}

/* FILTER OVERRIDES FROM SCREENSHOT */
.input-dark option {
  background: #000;
  color: #fff;
}

.input-dark {
  border-radius: 6px;
  /* Slightly sharper than pill */
  font-weight: 600;
  /* REMOVE filter-sort ARROW if needed, or keeping default. Screenshot shows arrows. */
}

/* PORTAL STYLE FILTERS MATCH */
.input-dark {
  background: rgba(16, 22, 30, 0.95) !important;
  /* Slightly lighter than 8,12,18 */
  border: 1px solid #303d4d !important;
  /* Lighter border for visibility */
  color: #fff !important;
  border-radius: 8px !important;
  padding: 0 12px !important;
  /* Fix padding for select alignment */
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  height: 36px;
  display: flex;
  align-items: center;
}

.input-dark:focus {
  border-color: var(--neon) !important;
  box-shadow: 0 0 15px rgba(0, 255, 65, 0.2) !important;
  outline: none;
}

.input-dark option {
  background: #10161e;
  /* Match input bg */
  color: #fff;
  padding: 10px;
}

/* Project Group Header Visual */
.project-group-header {
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 12px;
  font-weight: 700;
  color: var(--neon);
  border-left: 3px solid var(--neon);
  margin-top: 10px;
  margin-bottom: 5px;
  border-radius: 0 4px 4px 0;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
}
/* MODAL EXIF RESOLVER STYLES */
#modal-exif-resolver {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  z-index: 10000; /* Ensure it's on top of everything */
  background: rgba(0, 0, 0, 0.85); /* Darker overlay */
  backdrop-filter: blur(5px);
}

#modal-exif-resolver .modal-content {
  background: var(--panel);
  border: 1px solid var(--neon);
  box-shadow: 0 0 30px rgba(0, 255, 65, 0.15);
  border-radius: 12px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#modal-exif-resolver .modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 15px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#modal-exif-resolver .section-title {
  color: var(--neon);
  font-size: 1.1rem;
  margin: 0;
}

#modal-exif-resolver #exif-img-preview {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #000;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

#modal-exif-resolver .form-group label {
  color: var(--text-soft);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 8px;
  display: block;
  text-transform: uppercase;
}

#modal-exif-resolver .input-dark {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-family: monospace;
}

#modal-exif-resolver .modal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
}

/* --- AI ANALYSIS STYLES --- */
.file-thumb-container {
  position: relative;
  width: min-content;
  height: min-content;
}

.ai-badge {
  position: absolute;
  bottom: 5px;
  left: 5px;
  right: 5px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 800;
  text-align: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(2px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 5;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-badge.mini {
  position: static;
  display: inline-block;
  width: fit-content;
  margin-top: 4px;
  padding: 1px 5px;
  font-size: 0.6rem;
}

.ai-badge.green {
  color: var(--neon);
  border-color: rgba(0, 255, 65, 0.5);
}
.ai-badge.orange {
  color: #ff9800;
  border-color: rgba(255, 152, 0, 0.5);
}
.ai-badge.red {
  color: var(--danger);
  border-color: rgba(255, 51, 51, 0.5);
}
.ai-badge.gray {
  color: #888;
  border-color: rgba(200, 200, 200, 0.5);
}

.ai-summary {
  font-size: 0.8rem;
  color: var(--text-soft);
  font-style: italic;
  margin-top: 4px;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.file-row:hover .ai-badge {
  background: rgba(0, 0, 0, 0.9);
}

.file-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.file-name {
  font-weight: 700;
  color: #fff;
}
