/**
 * Inorge Build ERP - tema corporativo
 * Ink navy + steel blue + acento rojo de marca
 */
:root {
  --ink: #0B1C2C;
  --ink-2: #12263A;
  --ink-3: #1A3348;
  --steel: #0B6BCB;
  --steel-hover: #0958A8;
  --steel-soft: #E8F3FC;
  --accent: #0B6BCB;
  --accent-soft: #E8F3FC;
  --bg: #F5F7FA;
  --surface: #FFFFFF;
  --card: #FFFFFF;
  --border: #E2E8F0;
  --border-light: #EEF2F6;
  --text: #0F172A;
  --text-muted: #64748B;
  --text-dim: #94A3B8;
  --success: #059669;
  --success-soft: #ECFDF5;
  --warning: #D97706;
  --warning-soft: #FFFBEB;
  --danger: #DC2626;
  --danger-soft: #FEF2F2;
  --info: #0B6BCB;
  --info-soft: #E8F3FC;

  /* Aliases legacy (páginas existentes) */
  --bg-body: var(--bg);
  --bg-surface: var(--surface);
  --bg-card: var(--card);
  --bg-card-hover: #F8FAFC;
  --border-color: var(--border);
  --primary: var(--steel);
  --primary-light: var(--steel-soft);
  --primary-glow: rgba(27, 79, 114, 0.15);
  --secondary: var(--ink-2);
  --accent-gold: #A67C27;
  --accent-orange: #C45C26;
  --success-light: var(--success-soft);
  --danger-light: var(--danger-soft);
  --warning-light: var(--warning-soft);
  --info-light: var(--info-soft);
  --purple: #4A5568;
  --purple-light: #EDF0F3;
  --text-main: var(--text);
  --font-heading: 'Outfit', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --shadow-card: 0 8px 28px rgba(11, 28, 44, 0.06);
  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-shadow: 0 18px 50px rgba(11, 28, 44, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  --sidebar-w: 260px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--steel); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--steel-hover); }

.app-shell { display: flex; width: 100vw; min-height: 100vh; }

/* -- Sidebar -- */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
  border-right: 1px solid rgba(255,255,255,.06);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 100;
  transition: transform .25s ease;
}
.sidebar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
}

.sidebar-brand {
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  min-height: 72px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background .15s ease;
}
.sidebar-brand:hover {
  background: rgba(11, 107, 203, 0.06);
  color: inherit;
}
.sidebar-brand:focus-visible {
  outline: 2px solid var(--steel);
  outline-offset: -2px;
}
.sidebar-brand .brand-logo-wrap {
  background: rgba(255,255,255,.92);
  padding: 6px 8px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  max-width: 88px;
}
.sidebar-brand img {
  max-height: 40px;
  max-width: 72px;
  width: auto;
  object-fit: contain;
  background: transparent;
}
.brand-logo-icon {
  width: 40px; height: 40px;
  background: var(--steel);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700; font-size: 18px; color: #fff;
  flex-shrink: 0;
}
.brand-text h1 {
  font-family: var(--font-heading);
  font-size: 15px; font-weight: 700; color: #fff; line-height: 1.2;
  letter-spacing: .02em;
}
.brand-text span {
  font-size: 10px; color: rgba(255,255,255,.55);
  font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 10px 20px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 2px;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 4px; }

.nav-section-title {
  font-size: 10px; font-weight: 700;
  color: rgba(255,255,255,.38);
  text-transform: uppercase; letter-spacing: .1em;
  padding: 14px 12px 6px;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  color: rgba(255,255,255,.72);
  font-weight: 500; font-size: 13px;
  border-radius: 999px;
  border-left: 0;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.nav-item:hover {
  color: #fff;
  background: rgba(255,255,255,.08);
}
.nav-item.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-left-color: transparent;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}
.nav-icon {
  font-size: 11px;
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.7);
  font-weight: 700;
  letter-spacing: 0;
  flex-shrink: 0;
}
.nav-item.active .nav-icon { background: rgba(255,255,255,.12); color: #fff; }
.nav-item.nav-exit { color: #F0A8A4; margin-top: 8px; }
.nav-item.nav-exit:hover { color: #fff; background: rgba(180,35,28,.25); }

.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.2);
}
.license-pill {
  background: rgba(27, 122, 78, .15);
  border: 1px solid rgba(27, 122, 78, .35);
  color: #7DCEA0;
  padding: 8px 10px; border-radius: var(--radius-sm);
  font-size: 10px; font-weight: 700;
  letter-spacing: .04em;
  display: flex; align-items: center; justify-content: space-between;
}

/* -- Main -- */
.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex; flex-direction: column;
  min-height: 100vh;
  width: calc(100vw - var(--sidebar-w));
  background: transparent;
}

.topbar {
  height: 58px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 1px 0 rgba(11, 28, 44, 0.04);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px;
  position: sticky; top: 0; z-index: 90;
}
.project-selector {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 5px 12px; border-radius: var(--radius-md);
}
.project-selector .proj-tag {
  font-size: 10px; font-weight: 700;
  color: var(--steel);
  text-transform: uppercase; letter-spacing: .06em;
  background: var(--steel-soft);
  padding: 3px 8px; border-radius: 3px;
}
.project-selector select {
  background: transparent; border: none;
  color: var(--text); font-family: var(--font-body);
  font-size: 13px; font-weight: 600; outline: none; cursor: pointer;
  max-width: 280px;
}
.topbar-scope {
  font-size: 11px; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .06em;
}
.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-right .btn {
  align-self: center;
  height: 34px;
  padding: 0 12px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  box-sizing: border-box;
}

.user-profile {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 3px 12px 3px 3px;
  border-radius: 999px;
  text-decoration: none;
  color: inherit;
  height: 38px;
  box-sizing: border-box;
  transition: border-color .15s ease, background .15s ease;
}
.user-profile:hover { border-color: var(--steel); background: #fff; }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 12px;
  flex-shrink: 0;
  object-fit: cover;
}
.user-info { display: flex; flex-direction: column; justify-content: center; line-height: 1.15; min-width: 0; }
.user-name { font-weight: 600; font-size: 12.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.user-role { font-size: 10.5px; color: var(--steel); font-weight: 600; }

.btn-logout {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0 14px; border-radius: var(--radius-md);
  font-size: 12px; font-weight: 600;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
  height: 34px; box-sizing: border-box;
  transition: all .15s ease;
}
.btn-logout:hover { background: var(--accent-soft); color: var(--accent); border-color: #E8C4C2; }

.content-body { padding: 24px 28px; flex: 1; }
.app-footer {
  padding: 14px 28px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 11.5px; color: var(--text-muted);
}

/* -- Components -- */
.card {
  background: var(--glass-strong);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 18px 20px;
  box-shadow: var(--glass-shadow);
  margin-bottom: 16px;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 1px solid rgba(11, 28, 44, 0.06);
}
.card-title {
  font-family: var(--font-heading);
  font-size: 16px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 999px;
  font-family: var(--font-body); font-weight: 600; font-size: 13px;
  cursor: pointer; border: none; transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.btn-primary { background: var(--steel); color: #fff; box-shadow: 0 8px 20px rgba(27, 79, 114, 0.25); }
.btn-primary:hover { background: var(--steel-hover); }
.btn-secondary, .btn-outline {
  background: rgba(255, 255, 255, 0.55);
  color: var(--text);
  border: 1px solid rgba(11, 28, 44, 0.1);
  backdrop-filter: blur(8px);
}
.btn-secondary:hover, .btn-outline:hover { background: rgba(255, 255, 255, 0.85); border-color: #C5CDD8; }

.badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 3px;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .03em; text-transform: uppercase;
}
.badge-success { background: var(--success-soft); color: var(--success); border: 1px solid #C5E4D2; }
.badge-warning { background: var(--warning-soft); color: var(--warning); border: 1px solid #F0E0B0; }
.badge-danger { background: var(--danger-soft); color: var(--danger); border: 1px solid #E8C4C2; }
.badge-info { background: var(--info-soft); color: var(--steel); border: 1px solid #C5D8E6; }
.badge-purple, .badge-secondary { background: #EDF0F3; color: #4A5568; border: 1px solid var(--border); }

.modal-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(11, 28, 44, .55);
  z-index: 1000; align-items: center; justify-content: center;
}
.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 560px;
  padding: 24px;
  box-shadow: 0 16px 48px rgba(11,28,44,.18);
  max-height: 90vh; overflow-y: auto;
}
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block; font-size: 11px; font-weight: 600;
  color: var(--text-muted); margin-bottom: 5px;
  text-transform: uppercase; letter-spacing: .04em;
}
.form-control {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  color: var(--text);
  font-family: var(--font-body); font-size: 13px;
  outline: none; transition: border-color .15s ease;
}
.form-control:focus { border-color: var(--steel); box-shadow: 0 0 0 3px var(--steel-soft); }

.table, .table-clean { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table-clean th {
  text-align: left; padding: 10px 12px;
  font-size: 11px; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 1px solid var(--border);
  background: #FAFBFC;
}
.table td, .table-clean td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
}
.font-mono { font-family: ui-monospace, 'Cascadia Code', monospace; font-size: 12.5px; }
.text-muted { color: var(--text-muted); }

/* Hub = home de módulos + branding empresa */
.hub-hero {
  margin-bottom: 18px;
  padding: 22px 24px;
  background: linear-gradient(135deg, rgba(11, 28, 44, 0.96) 0%, rgba(18, 38, 58, 0.92) 50%, rgba(27, 79, 114, 0.9) 140%);
  border-radius: 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 40px rgba(11, 28, 44, 0.2);
}
.hub-hero::before {
  content: '';
  position: absolute;
  width: 240px; height: 240px;
  right: -40px; top: -70px;
  background: radial-gradient(circle, rgba(255,255,255,.12), transparent 65%);
  pointer-events: none;
}
.hub-hero::after { display: none; }
.hub-company {
  display: flex;
  gap: 18px;
  align-items: center;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}
.hub-company-logo {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border-radius: 18px;
  background: rgba(255,255,255,.95);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-shadow: 0 12px 28px rgba(0,0,0,.25);
}
.hub-company-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.hub-company-mark {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 800;
  color: #1B4F72;
}
.hub-company-meta { min-width: 0; flex: 1; }
.hub-company-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin-bottom: 4px;
}
.hub-company-meta h1 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -.02em;
  margin: 0 0 8px;
  color: #fff;
}
.hub-company-facts {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.hub-company-facts li {
  font-size: 12.5px;
  color: rgba(255,255,255,.92);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  padding: 4px 10px;
}
.hub-company-facts li span {
  color: rgba(255,255,255,.55);
  font-weight: 600;
  margin-right: 4px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.hub-company-hint,
.hub-company-hint a,
.hub-company-hint strong {
  /* Legacy: el portal ya no muestra hint ni link de branding */
  display: none;
}
.hub-hero h1 {
  font-family: var(--font-heading);
  font-size: 24px; font-weight: 750;
  letter-spacing: -.02em; margin-bottom: 4px;
  position: relative; z-index: 1;
}
.hub-hero p {
  font-size: 13.5px; color: rgba(255,255,255,.7);
  max-width: 640px; position: relative; z-index: 1;
}
@media (max-width: 640px) {
  .hub-company { align-items: flex-start; }
  .hub-company-logo { width: 72px; height: 72px; }
  .hub-company-meta h1 { font-size: 20px; }
}
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px 10px;
  padding: 8px 4px 4px;
}
.hub-mod {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 10px 8px 12px;
  background: transparent;
  border: 0;
  border-radius: 16px;
  color: var(--text);
  box-shadow: none;
  backdrop-filter: none;
  transition: transform .16s ease, background .16s ease;
  min-height: 0;
  text-align: center;
}
.hub-mod:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.55);
  border-color: transparent;
  box-shadow: none;
  color: var(--text);
}
.hub-mod .hm-code,
.hub-mod .app-ico-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px; height: 72px;
  border-radius: 18px;
  font-size: 20px; font-weight: 800;
  letter-spacing: .02em;
  background: var(--steel);
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 14px 28px rgba(11, 28, 44, 0.22);
}
.hub-mod .app-ico-wrap svg { width: 32px; height: 32px; }
.hub-mod .hm-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; width: 100%; }
.hub-mod .hm-title {
  font-family: var(--font-heading);
  font-size: 13px; font-weight: 700;
  line-height: 1.25;
}
.hub-mod .hm-desc {
  font-size: 11px; color: var(--text-muted); line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Bienvenida: gestión de obra + módulos */
.hub-section { margin-bottom: 22px; }
.hub-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.hub-section-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 750;
  color: var(--text);
  letter-spacing: -.01em;
}
.hub-section-sub {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
}
.hub-obra-active {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.hub-obra-kicker {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.hub-obra-name {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.hub-obra-meta { font-size: 12.5px; margin-top: 4px; }
.hub-obra-active-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.hub-obra-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.hub-obra-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.55);
  color: var(--text);
  text-decoration: none;
  font-size: 12.5px;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.hub-obra-chip:hover {
  background: rgba(255,255,255,.85);
  border-color: var(--steel);
  transform: translateY(-1px);
  color: var(--text);
}
.hub-obra-chip-code {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  font-weight: 700;
  color: var(--steel);
}
.hub-obra-chip-name { font-weight: 600; }
.hub-tools {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.hub-tool {
  display: flex;
  align-items: center;
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.5);
  color: var(--text);
  text-decoration: none;
  min-height: 52px;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.hub-tool:hover {
  background: rgba(255,255,255,.82);
  border-color: rgba(11, 107, 203, .35);
  transform: translateY(-2px);
  color: var(--text);
}
.hub-tool-title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}
body.theme-buildops .hub-obra-chip,
body.theme-buildops .hub-tool,
body.theme-buildops .hub-obra-active {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-color: var(--glass-border, rgba(255,255,255,.45));
}
.hub-continue {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.hub-cat { margin-bottom: 20px; }
.hub-cat-title {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.hub-grid-portal {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.hub-mod-portal {
  background: rgba(255,255,255,.45);
  border: 1px solid var(--border);
  padding: 14px 10px 16px;
}
.hub-mod-portal:hover {
  background: rgba(255,255,255,.8);
  border-color: rgba(11, 107, 203, .3);
}
body.theme-buildops .hub-mod-portal {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-color: var(--glass-border, rgba(255,255,255,.45));
}

/* -- Apps home (Odoo-style full screen) -- */
#appsOverlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 220;
  flex-direction: column;
  padding: 0;
  background:
    radial-gradient(ellipse 60% 50% at 15% 10%, rgba(27, 79, 114, 0.55), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 0%, rgba(180, 35, 28, 0.22), transparent 50%),
    linear-gradient(160deg, #0B1C2C 0%, #12263A 45%, #1A3348 100%);
  backdrop-filter: none;
}
#appsOverlay.show { display: flex; }
#appsPanel {
  position: relative;
  background: transparent;
  backdrop-filter: none;
  border: 0;
  border-radius: 0;
  max-width: none;
  width: 100%;
  height: 100%;
  padding: 0;
  box-shadow: none;
  max-height: none;
  overflow: auto;
  display: flex;
  flex-direction: column;
}
#appsPanel::before { display: none; }
.apps-home-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(11, 28, 44, 0.72);
  backdrop-filter: blur(16px);
}
.apps-home-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  min-width: 160px;
}
.apps-home-brand strong {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -.01em;
}
.apps-home-brand span {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,.55);
  margin-top: 1px;
}
.apps-search-wrap {
  flex: 1;
  max-width: 480px;
  position: relative;
}
.apps-search-wrap input {
  width: 100%;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.1);
  color: #fff;
  border-radius: 999px;
  padding: 11px 16px 11px 40px;
  font-size: 14px;
  outline: none;
}
.apps-search-wrap input::placeholder { color: rgba(255,255,255,.45); }
.apps-search-wrap input:focus {
  border-color: rgba(255,255,255,.35);
  background: rgba(255,255,255,.14);
  box-shadow: 0 0 0 3px rgba(27, 79, 114, 0.35);
}
.apps-search-wrap::before {
  content: '⌕';
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,.5);
  font-size: 15px;
}
.apps-home-actions { display: flex; align-items: center; gap: 8px; }
.apps-close-btn,
.apps-home-link {
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  color: #fff;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.apps-close-btn:hover,
.apps-home-link:hover {
  background: rgba(255,255,255,.16);
  color: #fff;
}
.apps-home-body {
  padding: 36px 28px 48px;
  max-width: 920px;
  width: 100%;
  margin: 0 auto;
}
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px 8px;
  justify-items: center;
}
.apps-grid a,
.apps-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 8px 12px;
  border: 0;
  border-radius: 18px;
  text-decoration: none;
  color: #fff;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
  min-height: 0;
  width: 100%;
  max-width: 120px;
  transition: transform .15s ease, background .15s ease;
}
.apps-grid a:hover,
.apps-tile:hover {
  transform: translateY(-4px) scale(1.03);
  background: rgba(255, 255, 255, 0.08);
  border-color: transparent;
  box-shadow: none;
}
.apps-grid .ac,
.apps-grid .app-ico-wrap {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}
.apps-grid .app-ico-wrap svg { width: 30px; height: 30px; }
.apps-grid .at {
  font-size: 12.5px;
  font-weight: 650;
  font-family: var(--font-heading, 'Outfit', sans-serif);
  color: rgba(255,255,255,.92);
  line-height: 1.2;
  text-align: center;
}
.apps-grid .ad { display: none; }
.apps-cat {
  display: none;
  grid-column: 1 / -1;
  color: rgba(255,255,255,.55);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 12px 0 4px;
  width: 100%;
}
.apps-cat:first-child { margin-top: 0; }
.apps-cat.is-hidden,
.apps-tile.is-hidden { display: none !important; }
.apps-empty {
  display: none;
  text-align: center;
  color: rgba(255,255,255,.55);
  padding: 40px 16px;
  font-size: 14px;
}
.apps-empty.show { display: block; }

/* Breadcrumb / volver a Apps */
.erp-crumbbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  padding: 10px 14px;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(11,28,44,.05);
}
.erp-crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  min-width: 0;
}
.erp-crumbs a {
  color: var(--steel);
  font-weight: 600;
  text-decoration: none;
}
.erp-crumbs a:hover { text-decoration: underline; }
.erp-crumbs .sep { opacity: .45; }
.erp-crumbs .here { color: var(--ink); font-weight: 700; }
.erp-back-apps {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff !important;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(11,28,44,.2);
}
.erp-back-apps:hover { background: var(--ink-2); color: #fff !important; }
.apps-grid-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(11,28,44,.12);
  background: rgba(255,255,255,.7);
  display: inline-grid;
  grid-template-columns: repeat(3, 5px);
  grid-template-rows: repeat(3, 5px);
  gap: 3px;
  place-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.apps-grid-btn span {
  width: 5px; height: 5px;
  border-radius: 1.5px;
  background: var(--ink);
  display: block;
}
.apps-grid-btn:hover { background: #fff; border-color: var(--steel); }
.nav-item.nav-apps-home {
  background: rgba(255,255,255,.12) !important;
  color: #fff !important;
  font-weight: 700;
  margin-bottom: 4px;
}
.nav-back-apps {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 8px 4px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.12);
  cursor: pointer;
  width: calc(100% - 16px);
  font-family: inherit;
}
.nav-back-apps:hover { background: rgba(255,255,255,.18); color: #fff; }

/* Field service - OT status + dispatch board */
.wo-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  background: #EEF2F7;
  color: #475569;
}
.wo-status.draft, .wo-status.open { background: #E8F1FF; color: #1B4F72; }
.wo-status.scheduled { background: #E0F2FE; color: #0369A1; }
.wo-status.in_progress { background: #FEF3C7; color: #B45309; }
.wo-status.completed, .wo-status.invoiced { background: #D1FAE5; color: #047857; }
.wo-status.cancelled { background: #F1F5F9; color: #64748B; }

.dispatch-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  align-items: start;
}
.dispatch-col {
  background: rgba(255,255,255,.72);
  border: 1px solid var(--border, #E6E9F0);
  border-radius: 16px;
  min-height: 180px;
  padding: 0 0 12px;
  box-shadow: 0 8px 24px rgba(11,28,44,.04);
}
.dispatch-col-unassigned { border-style: dashed; background: rgba(247,250,252,.9); }
.dispatch-col-head {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-weight: 750;
  font-size: 13px;
  padding: 12px 14px;
  border-bottom: 1px solid #EEF1F6;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dispatch-count {
  background: #0F766E;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}
.dispatch-card {
  margin: 10px 10px 0;
  padding: 12px;
  background: #fff;
  border: 1px solid #E6E9F0;
  border-radius: 12px;
}
.dispatch-card-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--text, #15202B);
  text-decoration: none;
  display: block;
  line-height: 1.35;
}
.dispatch-card-title:hover { color: #0F766E; }
.dispatch-card-meta { font-size: 12px; color: var(--text-muted, #64748B); margin-top: 4px; }
.dispatch-assign {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}
.dispatch-empty {
  padding: 28px 14px;
  text-align: center;
  color: #9699A6;
  font-size: 12.5px;
}

@media (max-width: 992px) {
  .sidebar { transform: translateX(-100%); }
  .main-wrapper { margin-left: 0; width: 100vw; }
  .apps-home-bar { flex-wrap: wrap; padding: 14px 16px; }
  .apps-home-body { padding: 20px 16px 32px; }
  .erp-crumbbar { flex-direction: column; align-items: stretch; }
}

/* -- Glass ERP: transparencia + colores de marca Inorge (navy / steel) -- */
body.theme-buildops {
  --ink: #0B1C2C;
  --ink-2: #12263A;
  --ink-3: #1A3348;
  --steel: #0B6BCB;
  --steel-hover: #0958A8;
  --steel-soft: rgba(11, 107, 203, 0.12);
  --accent: #0B6BCB;
  --accent-soft: #E8F3FC;
  --bg: transparent;
  --surface: rgba(255, 255, 255, 0.72);
  --card: rgba(255, 255, 255, 0.62);
  --border: rgba(11, 28, 44, 0.12);
  --border-light: rgba(11, 28, 44, 0.07);
  --text: #0F172A;
  --text-muted: #64748B;
  --text-dim: #94A3B8;
  --success: #059669;
  --success-soft: #ECFDF5;
  --warning: #D97706;
  --warning-soft: #FFFBEB;
  --danger: #DC2626;
  --danger-soft: #FEF2F2;
  --info: #0B6BCB;
  --info-soft: #E8F3FC;
  --primary: var(--steel);
  --primary-light: var(--steel-soft);
  --bg-body: transparent;
  --bg-surface: var(--surface);
  --bg-card: var(--card);
  --bg-card-hover: rgba(255, 255, 255, 0.82);
  --border-color: var(--border);
  --text-main: var(--text);
  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(255, 255, 255, 0.7);
  --glass-shadow: 0 18px 50px rgba(11, 28, 44, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  --glass-blur: blur(20px) saturate(1.25);
  --brand-red: #B4231C;
  color: var(--text);
  background-color: #E8EEF5;
  background-image:
    radial-gradient(ellipse 70% 45% at 12% 8%, rgba(11, 107, 203, 0.18), transparent 55%),
    radial-gradient(ellipse 55% 40% at 88% 12%, rgba(11, 28, 44, 0.1), transparent 50%),
    radial-gradient(ellipse 60% 45% at 70% 95%, rgba(11, 107, 203, 0.08), transparent 55%),
    linear-gradient(165deg, #F0F5FA 0%, #E4EBF3 45%, #DCE5F0 100%);
  background-attachment: fixed;
  min-height: 100vh;
}
body.theme-buildops::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(11, 28, 44, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 28, 44, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.7;
}
body.theme-buildops .app-shell { position: relative; z-index: 1; }
body.theme-buildops .sidebar {
  background: var(--glass-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--border);
  box-shadow: 4px 0 24px rgba(11, 28, 44, 0.06);
}
body.theme-buildops .sidebar::before {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--steel), transparent);
}
body.theme-buildops .sidebar-brand { border-bottom: 1px solid var(--border-light); }
body.theme-buildops .brand-logo-wrap { background: rgba(255, 255, 255, 0.95); }
body.theme-buildops .brand-text h1 { color: var(--text); }
body.theme-buildops .brand-text span { color: var(--text-muted); }
body.theme-buildops .nav-section-title { color: var(--text-dim); }
body.theme-buildops .nav-item { color: var(--text-muted); }
body.theme-buildops .nav-item:hover { background: var(--steel-soft); color: var(--steel); }
body.theme-buildops .nav-item.active {
  background: var(--steel-soft); color: var(--steel); font-weight: 600;
  box-shadow: inset 3px 0 0 var(--steel);
}
body.theme-buildops .nav-back-apps {
  color: var(--text); border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
body.theme-buildops .nav-back-apps:hover { border-color: var(--steel); color: var(--steel); }
body.theme-buildops .sidebar-footer {
  background: rgba(255, 255, 255, 0.4); border-top: 1px solid var(--border-light);
}
body.theme-buildops .license-pill {
  background: var(--success-soft); border-color: #A7F3D0; color: #047857;
}
body.theme-buildops .nav-item.nav-exit { color: var(--danger); }
body.theme-buildops .nav-item.nav-exit:hover { color: #fff; background: var(--danger); }
body.theme-buildops .sidebar-nav::-webkit-scrollbar-thumb { background: rgba(11, 28, 44, 0.15); }
body.theme-buildops .main-wrapper { background: transparent; }
body.theme-buildops .topbar {
  background: var(--glass);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border); box-shadow: none;
}
body.theme-buildops .content-body { background: transparent; }
body.theme-buildops .project-selector select {
  background: rgba(255, 255, 255, 0.7); color: var(--text); border-color: var(--border);
}
body.theme-buildops .user-profile {
  background: rgba(255, 255, 255, 0.65); border-color: var(--border);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
body.theme-buildops .user-profile:hover { border-color: var(--steel); background: #fff; }
body.theme-buildops .user-role { color: var(--steel); }
body.theme-buildops .btn-logout { color: var(--text-muted); border-color: var(--border); }
body.theme-buildops .btn-logout:hover {
  background: var(--danger-soft); color: var(--danger); border-color: #FECACA;
}
body.theme-buildops .app-footer {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top-color: var(--border-light); color: var(--text-muted);
}
body.theme-buildops .card,
body.theme-buildops .ops-quick a,
body.theme-buildops .wo-chip,
body.theme-buildops .my-jobs-card,
body.theme-buildops .dispatch-col,
body.theme-buildops .dispatch-card,
body.theme-buildops .panel,
body.theme-buildops .erp-crumbbar {
  background: var(--glass-strong);
  border-color: var(--border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}
body.theme-buildops .card { border: 1px solid var(--glass-border); }
body.theme-buildops .card-header { border-bottom-color: var(--border-light); }
body.theme-buildops .btn-primary {
  background: var(--steel); color: #fff;
  box-shadow: 0 8px 20px rgba(11, 107, 203, 0.28);
}
body.theme-buildops .btn-primary:hover { background: var(--steel-hover); color: #fff; }
body.theme-buildops .btn-secondary,
body.theme-buildops .btn-outline {
  background: rgba(255, 255, 255, 0.55); color: var(--text);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
body.theme-buildops .btn-secondary:hover,
body.theme-buildops .btn-outline:hover {
  border-color: var(--steel); color: var(--steel); background: var(--steel-soft);
}
body.theme-buildops a { color: var(--steel); }
body.theme-buildops a:hover { color: var(--steel-hover); }
body.theme-buildops .erp-crumbs a,
body.theme-buildops .apps-open-link,
body.theme-buildops button.apps-open-link { color: var(--steel) !important; }

body.theme-buildops #appsOverlay {
  background: rgba(11, 28, 44, 0.35);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  align-items: stretch; justify-content: center; padding: 48px 24px;
}
body.theme-buildops #appsPanel {
  background: var(--glass-strong);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border); border-radius: 20px;
  max-width: 960px; width: 100%; margin: 0 auto;
  box-shadow: 0 28px 80px rgba(11, 28, 44, 0.22);
  overflow: hidden; display: flex; flex-direction: column;
  max-height: calc(100vh - 96px);
}
body.theme-buildops .apps-home-bar {
  background: rgba(255, 255, 255, 0.65); border-bottom: 1px solid var(--border); color: var(--text);
}
body.theme-buildops .apps-home-brand strong { color: var(--text); }
body.theme-buildops .apps-home-brand span { color: var(--text-muted); }
body.theme-buildops .apps-home-body { background: transparent; overflow: auto; flex: 1; }
body.theme-buildops .apps-search-wrap input {
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.85);
  color: var(--text); box-shadow: none; caret-color: var(--text);
  -webkit-text-fill-color: var(--text);
}
body.theme-buildops .apps-search-wrap input::placeholder {
  color: var(--text-muted); opacity: 1; -webkit-text-fill-color: var(--text-muted);
}
body.theme-buildops .apps-search-wrap input:focus {
  border-color: var(--steel); background: #fff; color: var(--text);
  box-shadow: 0 0 0 3px rgba(11, 107, 203, 0.15);
}
body.theme-buildops .apps-search-wrap::before { color: var(--text-muted); }
body.theme-buildops .apps-close-btn,
body.theme-buildops .apps-home-link {
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.7); color: var(--text);
}
body.theme-buildops .apps-close-btn:hover,
body.theme-buildops .apps-home-link:hover {
  border-color: var(--steel); color: var(--steel); background: var(--steel-soft);
}
body.theme-buildops .apps-cat {
  display: block; grid-column: 1 / -1; color: var(--text-muted);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  margin: 8px 0 2px; padding: 0 2px; width: 100%;
}
body.theme-buildops .apps-cat:first-child { margin-top: 0; }
body.theme-buildops .apps-cat.is-hidden { display: none !important; }
body.theme-buildops .apps-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  justify-items: stretch; gap: 12px;
}
body.theme-buildops .apps-tile {
  max-width: none; align-items: flex-start; text-align: left;
  background: rgba(255, 255, 255, 0.7); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px; color: var(--text); gap: 6px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
body.theme-buildops .apps-tile:hover {
  border-color: var(--steel); background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 28px rgba(11, 107, 203, 0.12); transform: translateY(-2px);
}
body.theme-buildops .apps-grid .app-ico-wrap,
body.theme-buildops .apps-grid .ac { width: 40px; height: 40px; border-radius: 10px; box-shadow: none; }
body.theme-buildops .apps-grid .app-ico-wrap svg { width: 20px; height: 20px; }
body.theme-buildops .apps-grid .at { color: var(--text); text-align: left; font-size: 13.5px; font-weight: 650; }
body.theme-buildops .apps-grid .ad { display: none; }
body.theme-buildops .apps-empty { color: var(--text-muted); }

body.theme-buildops .job-toolbar input,
body.theme-buildops .job-toolbar select,
body.theme-buildops .master-toolbar input[type="search"],
body.theme-buildops .form-control,
body.theme-buildops input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),
body.theme-buildops select,
body.theme-buildops textarea {
  background: rgba(255, 255, 255, 0.75); color: var(--text); border-color: var(--border);
}
body.theme-buildops .day-nav,
body.theme-buildops .day-nav.sticky-day,
body.theme-buildops .dispatch-col-h {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
body.theme-buildops .dispatch-col-unassigned {
  background: rgba(247, 250, 252, 0.65); border-style: dashed;
}
body.theme-buildops a.status-chip-filter {
  background: rgba(255, 255, 255, 0.7); border-color: var(--border); color: var(--text-muted);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
body.theme-buildops a.status-chip-filter:hover,
body.theme-buildops a.status-chip-filter.active {
  border-color: var(--steel); color: var(--steel); background: var(--steel-soft);
}
body.theme-buildops a.status-chip-filter.active .n { background: #fff; color: var(--steel); }
body.theme-buildops .job-invoice-cta {
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.85), rgba(240, 249, 255, 0.85));
  border-color: #A7F3D0;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
body.theme-buildops #chatFab {
  background: var(--steel) !important; color: #fff !important;
  box-shadow: 0 12px 28px rgba(11, 107, 203, 0.35) !important;
}
body.theme-buildops #chatDock {
  background: rgba(255, 255, 255, 0.88) !important; border-color: var(--border) !important;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
body.theme-buildops #notifPanel {
  background: rgba(255, 255, 255, 0.92) !important; border-color: var(--border) !important;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  body.theme-buildops .sidebar,
  body.theme-buildops .topbar,
  body.theme-buildops .card,
  body.theme-buildops #appsPanel,
  body.theme-buildops .apps-tile,
  body.theme-buildops .glass-panel,
  body.theme-buildops .glass-toast,
  body.theme-buildops .job-summary-card,
  body.theme-buildops .wo-chip,
  body.theme-buildops .my-jobs-card,
  body.theme-buildops .dispatch-col,
  body.theme-buildops .app-footer {
    background: #FFFFFF;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* -- BuildOps density: jobs / lists / panels -- */
.job-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 16px;
}
.job-toolbar .field { display: flex; flex-direction: column; gap: 4px; min-width: 140px; }
.job-toolbar label { font-size: 11px; font-weight: 600; color: var(--text-muted); }
.job-toolbar input,
.job-toolbar select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
}
.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.job-header h1 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 4px 0 0;
}
.job-header .job-code { font-size: 12px; font-weight: 700; color: var(--steel); }
.job-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.job-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}
@media (max-width: 900px) {
  .job-grid { grid-template-columns: 1fr; }
}
.job-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.job-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
.job-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}
.job-table tr:hover td { background: var(--steel-soft); }
.job-table .code { font-weight: 700; color: var(--steel); }
.job-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  position: relative;
  padding: 0 0 14px 16px;
  border-left: 2px solid var(--border);
  font-size: 12.5px;
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: '';
  position: absolute;
  left: -5px; top: 4px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--steel);
}
.timeline .when { color: var(--text-dim); font-size: 11px; }
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}
.checklist-item:last-child { border-bottom: 0; }
.master-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}
.master-toolbar input[type="search"] {
  flex: 1;
  min-width: 180px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
}
.prio-badge {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  background: #EEF2F7;
  color: #475569;
}
.prio-badge.high { background: #FEE2E2; color: #B91C1C; }
.prio-badge.med { background: #FEF3C7; color: #B45309; }
.prio-badge.low { background: #ECFDF5; color: #047857; }
.day-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--bg);
  padding: 4px 0 8px;
}
.dispatch-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
}
@media (max-width: 900px) {
  .dispatch-layout { grid-template-columns: 1fr; }
}
.dispatch-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.dispatch-col {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
}
.dispatch-col-h {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 13px;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 1;
  border-radius: 12px 12px 0 0;
}
.dispatch-col-b {
  padding: 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pool,
.dispatch-pool {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
}
.wo-chip {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  font-size: 12.5px;
  line-height: 1.35;
}
.wo-chip > a,
.wo-chip .code {
  font-weight: 700;
  color: var(--steel);
}
.wo-chip > a:hover,
.wo-chip .code:hover { color: var(--steel-hover); }
.wo-chip .meta {
  color: var(--text-muted);
  margin-top: 4px;
  font-size: 11.5px;
}
.wo-chip .title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.wo-chip .acts {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.wo-chip .acts button,
.wo-chip .acts a {
  font-size: 11px;
  padding: 3px 8px;
}
.wo-chip .prio { float: right; }
.wo-chip .wo-chip-top,
.wo-chip .title-row,
.my-jobs-card .wo-chip-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.wo-chip .time-badge,
.wo-chip .wo-time,
.wo-time {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: var(--steel-soft);
  color: var(--steel);
  font-variant-numeric: tabular-nums;
}
.day-nav.sticky-day {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  padding: 8px 0;
  margin-bottom: 4px;
}
.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  background: #EEF2F7;
  color: #475569;
}
.status-chip.draft, .status-chip.open { background: #E8F1FF; color: #1B4F72; }
.status-chip.scheduled { background: #E0F2FE; color: #0369A1; }
.status-chip.en_route { background: #DBEAFE; color: #1D4ED8; }
.status-chip.on_site { background: #FFEDD5; color: #C2410C; }
.status-chip.in_progress { background: #FEF3C7; color: #B45309; }
.status-chip.completed { background: #D1FAE5; color: #047857; }
.status-chip.reviewed { background: #CCFBF1; color: #0F766E; }
.status-chip.invoiced { background: #D1FAE5; color: #047857; }
.status-chip.cancelled { background: #F1F5F9; color: #64748B; }
.status-chip.pending_approval { background: #FEF3C7; color: #B45309; }
.status-chip.sent { background: #E0F2FE; color: #0369A1; }
.status-chip.accepted { background: #D1FAE5; color: #047857; }
.status-chip.observed { background: #FFEDD5; color: #C2410C; }
.status-chip.rejected { background: #FEE2E2; color: #B91C1C; }

/* Filter chip row (OT list / Despacho) */
.status-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
}
a.status-chip-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .12s, background .12s, color .12s;
}
a.status-chip-filter:hover {
  border-color: var(--steel);
  color: var(--steel);
  background: var(--steel-soft);
}
a.status-chip-filter.active {
  border-color: var(--steel);
  background: var(--steel-soft);
  color: var(--steel);
}
a.status-chip-filter .n {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-dim, #94A3B8);
}
a.status-chip-filter.active .n {
  background: #fff;
  color: var(--steel);
}

/* Job detail - invoice CTA + panel split */
.job-invoice-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #ECFDF5 0%, #F0F9FF 100%);
  border: 1px solid #A7F3D0;
  border-radius: 12px;
}
.job-invoice-cta strong {
  display: block;
  font-size: 14px;
  color: var(--text);
}
.job-invoice-cta span {
  font-size: 12.5px;
  color: var(--text-muted);
}
.job-panel-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 900px) {
  .job-panel-split { grid-template-columns: 1fr; }
}

.my-jobs-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.my-jobs-card h3 { margin: 0 0 4px; font-size: 15px; }
.my-jobs-card .acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.my-jobs-card .code { font-weight: 700; color: var(--steel); }
.my-jobs-checklist {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}
.my-jobs-card--pool {
  box-shadow: none;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--border-light);
  border-radius: 0;
  margin: 0;
}
.offline-queue-badge {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 1200;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: rgba(11, 107, 203, 0.92);
  box-shadow: 0 8px 24px rgba(11, 28, 44, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
@media (max-width: 700px) {
  .my-jobs-card .acts .btn {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
    text-align: center;
  }
  .dispatch-layout { gap: 12px; }
  body.page-my-jobs .app-main,
  body.page-my-jobs .content {
    padding-left: 0;
    padding-right: 0;
  }
  body.page-my-jobs .my-jobs-field {
    min-height: calc(100vh - 56px);
    padding: 8px 10px 72px;
  }
  body.page-my-jobs .my-jobs-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  body.page-my-jobs .my-jobs-pool {
    order: 2;
  }
  body.page-my-jobs .my-jobs-card {
    min-height: min(72vh, 560px);
    display: flex;
    flex-direction: column;
    padding: 18px 16px 20px;
    border-radius: 16px;
    margin-bottom: 14px;
  }
  body.theme-buildops.page-my-jobs .my-jobs-card {
    background: rgba(255, 255, 255, 0.62);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 10px 28px rgba(11, 28, 44, 0.08);
  }
  body.page-my-jobs .my-jobs-card h3 {
    font-size: 20px;
    line-height: 1.25;
    margin-bottom: 8px;
  }
  body.page-my-jobs .my-jobs-card .acts {
    margin-top: auto;
    padding-top: 16px;
  }
  body.page-my-jobs .my-jobs-card .acts .btn {
    flex: 1 1 100%;
    min-height: 44px;
    font-size: 14px;
  }
  body.page-my-jobs .my-jobs-card.is-open {
    min-height: auto;
  }
  body.page-my-jobs .day-nav.sticky-day {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 8px 4px;
    margin: 0 -4px 10px;
  }
  .offline-queue-badge {
    left: 12px;
    right: 12px;
    bottom: 12px;
    text-align: center;
  }
}

/* Ops home */
.ops-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.ops-hero h1 {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}
.ops-hero p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 14px;
  max-width: 520px;
}
.ops-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.ops-kpi {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}
.ops-kpi .lbl {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}
.ops-kpi .val {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  margin-top: 4px;
  letter-spacing: -0.03em;
  color: var(--text);
}
.ops-kpi .hint { font-size: 11.5px; color: var(--text-dim); margin-top: 4px; }
.ops-grid-2 {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}
.ops-quick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ops-quick a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.ops-quick a:hover {
  border-color: var(--steel);
  box-shadow: 0 4px 16px rgba(11, 107, 203, 0.08);
  color: var(--text);
}
.ops-quick a strong { font-size: 14px; }
.ops-quick a span { font-size: 12px; color: var(--text-muted); }
.ops-list { list-style: none; margin: 0; padding: 0; }
.ops-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}
.ops-list li:last-child { border-bottom: 0; }
.ops-list .code { font-weight: 650; color: var(--steel); }
.ops-list .meta { color: var(--text-muted); font-size: 12px; }
@media (max-width: 900px) {
  .ops-kpis { grid-template-columns: 1fr 1fr; }
  .ops-grid-2 { grid-template-columns: 1fr; }
}

/* -- Fase H: utilidades glass (marca) -- */
.glass-toast-host {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 8px;
  pointer-events: none; width: min(420px, calc(100vw - 32px));
}
.glass-toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  color: var(--text, #0F172A);
  font-size: 13px; font-weight: 550;
  box-shadow: 0 12px 40px rgba(11, 28, 44, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  animation: glassToastIn .35s ease;
}
.glass-toast .spark { color: var(--steel, #0B6BCB); font-size: 14px; line-height: 1; }
@keyframes glassToastIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.glass-panel,
.job-summary-card {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 22px; padding: 18px 20px;
  backdrop-filter: blur(20px) saturate(1.25);
  -webkit-backdrop-filter: blur(20px) saturate(1.25);
  box-shadow: 0 18px 50px rgba(11, 28, 44, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.job-summary-card .js-head {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-heading); font-weight: 700; font-size: 15px;
  margin-bottom: 12px; color: var(--text);
}
.job-summary-card .js-head .chev { color: var(--steel); letter-spacing: -2px; }
.job-summary-card .js-code { color: var(--steel); font-weight: 750; font-size: 18px; letter-spacing: -0.02em; }
.job-summary-card .js-site { color: var(--text-muted); font-size: 13px; margin: 2px 0 14px; }
.job-summary-card .js-ai-label { color: var(--steel); font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.job-summary-card .js-body { color: var(--text); font-size: 13.5px; line-height: 1.55; margin-bottom: 16px; }
.ai-hl {
  display: inline; border: 1px solid rgba(11, 107, 203, 0.45);
  border-radius: 6px; padding: 0 4px; background: rgba(11, 107, 203, 0.06);
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.job-summary-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.btn-sign {
  background: var(--steel); color: #fff; border: 0; border-radius: 999px;
  padding: 10px 18px; font-weight: 700; font-size: 13px; cursor: pointer;
  box-shadow: 0 8px 24px rgba(11, 107, 203, 0.28);
}
.btn-sign:hover { background: var(--steel-hover); }
.voice-listen { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 6px; }
.voice-wave { display: flex; align-items: flex-end; gap: 3px; height: 28px; }
.voice-wave span { width: 3px; border-radius: 2px; background: var(--steel); animation: voiceBar 1s ease-in-out infinite; }
.voice-wave span:nth-child(1) { height: 8px; }
.voice-wave span:nth-child(2) { height: 16px; animation-delay: .1s; }
.voice-wave span:nth-child(3) { height: 22px; animation-delay: .2s; }
.voice-wave span:nth-child(4) { height: 12px; animation-delay: .3s; }
.voice-wave span:nth-child(5) { height: 20px; animation-delay: .15s; }
.voice-wave span:nth-child(6) { height: 10px; animation-delay: .25s; }
.voice-wave span:nth-child(7) { height: 18px; animation-delay: .05s; }
.voice-wave span:nth-child(8) { height: 14px; animation-delay: .35s; }
@keyframes voiceBar {
  0%, 100% { transform: scaleY(0.55); opacity: .7; }
  50% { transform: scaleY(1); opacity: 1; }
}
.voice-listen .lbl { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; color: var(--text-muted); }

/* ========== GED 2.0 ========== */
.ged-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.ged-layout:has(.ged-viewer) {
  grid-template-columns: 180px minmax(0, 1fr) minmax(320px, 1.1fr);
}
.ged-sidebar,
.ged-viewer {
  padding: 14px;
}
.ged-sidebar-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.ged-folder {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 4px;
}
.ged-folder:hover,
.ged-folder.is-active {
  background: rgba(11, 107, 203, 0.1);
  color: var(--steel);
}
.ged-folder span {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
}
.ged-type {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--steel);
  background: rgba(11, 107, 203, 0.08);
  border: 1px solid rgba(11, 107, 203, 0.2);
  border-radius: 6px;
  padding: 2px 7px;
}
.ged-row-active td {
  background: rgba(11, 107, 203, 0.08) !important;
}
.ged-viewer-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--glass-border, var(--border-light));
}
.ged-preview {
  min-height: 280px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid var(--glass-border, var(--border-light));
}
.ged-preview-frame {
  width: 100%;
  height: 420px;
  border: 0;
  background: #fff;
}
.ged-preview-image {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  max-height: 480px;
}
.ged-preview-image img {
  max-width: 100%;
  max-height: 440px;
  object-fit: contain;
  border-radius: 8px;
}
.ged-preview-html,
.ged-preview-md {
  padding: 16px;
  font-size: 13.5px;
  line-height: 1.55;
  max-height: 420px;
  overflow: auto;
}
.ged-preview-md {
  white-space: pre-wrap;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12.5px;
}
.ged-preview-fallback {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
}
.ged-editor-area {
  min-height: 280px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.65);
  font-size: 13.5px;
  line-height: 1.55;
}
.ged-editor-area:focus {
  outline: 2px solid rgba(11, 107, 203, 0.35);
  outline-offset: 1px;
}
.ged-revisions {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--glass-border, var(--border-light));
}
.ged-revisions ul {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 180px;
  overflow: auto;
}
.ged-revisions li {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 12.5px;
}
.ged-modal {
  position: fixed;
  inset: 0;
  background: rgba(11, 28, 44, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.ged-modal-card {
  width: min(480px, 100%);
  padding: 22px;
  margin: 0;
}
@media (max-width: 1100px) {
  .ged-layout,
  .ged-layout:has(.ged-viewer) {
    grid-template-columns: 1fr;
  }
  .ged-sidebar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
  }
  .ged-sidebar-title { width: 100%; }
  .ged-folder { margin: 0; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .ged-modal { background: rgba(11, 28, 44, 0.72); }
}

/* Anotaciones GED (Fase J) */
.ged-ann-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--glass-border, var(--border-light));
}
.ged-ann-tool.is-active {
  background: var(--steel) !important;
  color: #fff !important;
  border-color: var(--steel) !important;
}
.ged-preview-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}
.ged-ann-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.ged-ann-mark {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-sizing: border-box;
}
.ged-ann-pin {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(11, 28, 44, 0.25);
  transform: translate(-50%, -100%);
}
.ged-ann-box,
.ged-ann-highlight {
  transform: none;
  border: 2px solid var(--steel);
  border-radius: 4px;
  min-width: 12px;
  min-height: 12px;
}
.ged-ann-highlight {
  background: rgba(11, 107, 203, 0.18);
  border-style: dashed;
}
.ged-ann-freehand {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--steel);
  opacity: .85;
}
.ged-ann-mark.is-resolved { opacity: .45; }
.ged-ann-panel {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--glass-border, var(--border-light));
}
.ged-ann-panel ul { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow: auto; }
.ged-ann-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}
.ged-ann-item.is-resolved { opacity: .7; }
.ged-ann-reply {
  font-size: 12px;
  color: var(--text-muted);
  margin: 2px 0 2px 8px;
}

/* Empty states unificados (Fase O5) */
.empty-state-card {
  text-align: center;
  padding: 28px 20px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 14px;
  backdrop-filter: blur(12px);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .empty-state-card { background: #fff; }
}
.empty-state-title {
  font-family: var(--font-heading, 'Segoe UI', sans-serif);
  font-size: 15px;
  font-weight: 750;
  color: var(--ink, #0B1C2C);
  margin: 0 0 6px;
}
.empty-state-body {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--text-muted);
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}
