:root {
  --sidebar-bg: #0d1f45;
  --sidebar-bg-2: #142a5e;
  --sidebar-text: #d7e0ff;
  --panel-bg: #ffffff;
  --surface: #edf2f9;
  --surface-accent: #e8eefb;
  --border: #dbe3f3;
  --text-color: #1f2937;
  --muted-color: #64748b;
  --topbar-bg: rgba(255, 255, 255, 0.92);
  --topbar-btn-bg: #ffffff;
  --topbar-btn-text: #1f2937;
  --topbar-btn-border: #dbe3f3;
  --card-header-bg: linear-gradient(180deg, #dde9fb 0%, #c8d8f3 100%);
  --subgrid-bg: #ffffff;
  --subgrid-title: #334155;
  --field-label: #334155;
  --hint-border: #dce3ef;
  --hint-bg: #f8fbff;
  --hint-text: #334155;
  --table-head-bg: #f8fbff;
  --table-hover-bg: rgba(47, 98, 255, 0.08);
  --input-bg: #ffffff;
  --input-border: #ced7e8;
  --input-text: #1f2937;
  --input-placeholder: #7b8699;
  --week-wrap-bg: #f8fbff;
  --week-head-text: #64748b;
  --week-row-border: #d8e2f2;
  --week-row-bg: #ffffff;
  --week-row-hover-border: #9eb7f6;
  --week-row-hover-bg: #f6f9ff;
  --week-row-active-border: #2f62ff;
  --week-row-active-bg: #edf3ff;
  --day-chip-bg: #ffffff;
  --day-chip-border: #dbe3f3;
  --day-chip-text: #334155;
  --day-chip-out-bg: #f4f6fa;
  --day-chip-out-text: #9aa8bd;
  --week-selected-bg: #ffffff;
  --week-selected-border: #c8d7f3;
  --week-selected-text: #334155;
  --accent: #2f62ff;
  --btn-pipeline-border: #dbe2ea;
  --btn-pipeline-bg: #e9ecef;
  --btn-pipeline-text: #2f3640;
  --btn-pipeline-border-hover: #cfd7e1;
  --btn-pipeline-bg-hover: #f1f3f5;
  --btn-pipeline-text-hover: #1f2937;
  --ambient-a: rgba(47, 98, 255, 0.22);
  --ambient-b: rgba(14, 165, 233, 0.18);
  --ambient-c: rgba(244, 114, 182, 0.12);
  --ambient-line-a: rgba(255, 255, 255, 0.65);
  --ambient-line-b: rgba(47, 98, 255, 0.08);
  --topbar-logo-size: 48px;
}

html.theme-dark {
  --sidebar-bg: #040911;
  --sidebar-bg-2: #070f1e;
  --sidebar-text: #d2ddff;
  --panel-bg: linear-gradient(140deg, rgba(255,255,255,.07) 0%, rgba(255,255,255,.02) 50%, rgba(255,255,255,.04) 100%), rgba(6,11,22,.82);
  --surface: #040911;
  --surface-accent: #071428;
  --border: rgba(174, 198, 240, .2);
  --text-color: #e6edff;
  --muted-color: #98a7c1;
  --topbar-bg: rgba(4, 9, 17, 0.84);
  --topbar-btn-bg: #091426;
  --topbar-btn-text: #dbe7ff;
  --topbar-btn-border: rgba(174, 198, 240, .18);
  --card-header-bg: linear-gradient(180deg, rgba(14, 30, 62, .88) 0%, rgba(8, 18, 42, .84) 100%);
  --subgrid-bg: rgba(6, 13, 28, .80);
  --subgrid-title: #d5e2ff;
  --field-label: #b7c8e9;
  --hint-border: rgba(100, 142, 210, .24);
  --hint-bg: #080f1e;
  --hint-text: #d2defc;
  --table-head-bg: #0a1829;
  --table-hover-bg: rgba(56, 90, 150, .18);
  --input-bg: #070f20;
  --input-border: rgba(100, 140, 200, .28);
  --input-text: #e8efff;
  --input-placeholder: #8293ae;
  --week-wrap-bg: #070e1e;
  --week-head-text: #99adc9;
  --week-row-border: rgba(42, 70, 110, .7);
  --week-row-bg: #08102a;
  --week-row-hover-border: rgba(62, 91, 135, .8);
  --week-row-hover-bg: #101f3b;
  --week-row-active-border: #5d7eae;
  --week-row-active-bg: #162b4d;
  --day-chip-bg: #0b1630;
  --day-chip-border: rgba(47, 75, 115, .7);
  --day-chip-text: #d8e6ff;
  --day-chip-out-bg: #06101f;
  --day-chip-out-text: #7c8fab;
  --week-selected-bg: #0b1628;
  --week-selected-border: rgba(66, 93, 135, .8);
  --week-selected-text: #dce8ff;
  --accent: #7090b8;
  --btn-pipeline-border: rgba(52, 74, 108, .8);
  --btn-pipeline-bg: #0d1c34;
  --btn-pipeline-text: #d2defe;
  --btn-pipeline-border-hover: rgba(79, 104, 146, .9);
  --btn-pipeline-bg-hover: #152947;
  --btn-pipeline-text-hover: #e8efff;
  --ambient-a: rgba(0, 224, 255, 0.18);
  --ambient-b: rgba(82, 214, 255, 0.11);
  --ambient-c: rgba(14, 22, 36, 0.95);
  --ambient-line-a: rgba(255, 255, 255, 0.05);
  --ambient-line-b: rgba(4, 9, 17, 0.84);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text-color);
  font-size: 14px;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: -30%;
  pointer-events: none;
  z-index: 0;
}

body::before {
  background:
    radial-gradient(circle at 14% 22%, var(--ambient-a) 0%, transparent 36%),
    radial-gradient(circle at 86% 16%, var(--ambient-b) 0%, transparent 38%),
    radial-gradient(circle at 50% 84%, var(--ambient-c) 0%, transparent 42%);
  filter: blur(12px);
  animation: ambient-drift 22s ease-in-out infinite alternate;
}

body::after {
  background: linear-gradient(118deg, var(--ambient-line-a), transparent 35%, var(--ambient-line-b));
  opacity: .65;
  animation: ambient-wave 16s ease-in-out infinite alternate;
}

/* Light mode: desactivar ambient blobs del body (la excavadora es el fondo) */
html:not(.theme-dark) body::before,
html:not(.theme-dark) body::after {
  background: none;
  animation: none;
  opacity: 0;
}

html.theme-dark body:not(.login-page)::before {
  background:
    radial-gradient(circle at 18% 28%, rgba(0, 224, 255, .22) 0%, transparent 42%),
    radial-gradient(circle at 82% 72%, rgba(82, 214, 255, .13) 0%, transparent 46%),
    radial-gradient(circle at 50% 52%, rgba(14, 22, 36, .95) 0%, #040911 100%);
  filter: blur(44px) saturate(112%);
  opacity: .7;
  animation: login-aerosol-drift 20s ease-in-out infinite alternate;
}

html.theme-dark body:not(.login-page)::after {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .07) 0%, transparent 68%),
    linear-gradient(118deg, rgba(149, 198, 255, .1), transparent 35%, rgba(4, 9, 17, .84));
  mix-blend-mode: screen;
  filter: blur(8px);
  opacity: .25;
  animation: ambient-wave 20s ease-in-out infinite alternate;
}

@keyframes ambient-drift {
  0% {
    transform: translate3d(-2%, -1%, 0) scale(1);
  }

  50% {
    transform: translate3d(3%, 2%, 0) scale(1.05);
  }

  100% {
    transform: translate3d(-1%, 4%, 0) scale(1.08);
  }
}

@keyframes ambient-wave {
  0% {
    transform: rotate(0deg) scale(1);
    opacity: .42;
  }

  50% {
    transform: rotate(1.2deg) scale(1.03);
    opacity: .72;
  }

  100% {
    transform: rotate(-1.2deg) scale(1.06);
    opacity: .48;
  }
}

@keyframes light-orbit {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }

  50% {
    transform: translate3d(1.5%, -1.2%, 0) rotate(4deg) scale(1.04);
  }

  100% {
    transform: translate3d(-1.8%, 1.6%, 0) rotate(8deg) scale(1.08);
  }
}

@keyframes light-aurora {
  0% {
    transform: translate3d(-1%, -1%, 0) scale(1);
    opacity: .62;
  }

  50% {
    transform: translate3d(1.8%, 1.4%, 0) scale(1.04);
    opacity: .82;
  }

  100% {
    transform: translate3d(-1.2%, 2.2%, 0) scale(1.08);
    opacity: .7;
  }
}

@keyframes dark-stars-drift {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(0, -2000px, 0);
  }
}

@keyframes dark-stars-twinkle {

  0%,
  100% {
    opacity: .32;
  }

  50% {
    opacity: .62;
  }
}

.app-shell {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  isolation: isolate;
}

html:not(.theme-dark) .app-shell::before,
html:not(.theme-dark) .app-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

html:not(.theme-dark) .app-shell::before {
  z-index: -1;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.7) 0 0.18rem, transparent 0.22rem),
    radial-gradient(circle at 78% 24%, rgba(92, 134, 218, 0.12) 0 0.16rem, transparent 0.2rem),
    radial-gradient(circle at 36% 78%, rgba(168, 208, 255, 0.1) 0 0.14rem, transparent 0.19rem),
    radial-gradient(circle at 82% 72%, rgba(94, 180, 245, 0.12) 0 0.16rem, transparent 0.2rem);
  background-size: 360px 360px, 420px 420px, 390px 390px, 460px 460px;
  opacity: .55;
  mix-blend-mode: screen;
  animation: light-orbit 28s linear infinite;
}

html:not(.theme-dark) .app-shell::after {
  z-index: -1;
  inset: 2% 1.5% 1.5%;
  border-radius: 36px;
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.78), transparent 30%),
    radial-gradient(circle at 84% 20%, rgba(79, 128, 219, 0.16), transparent 32%),
    radial-gradient(circle at 64% 82%, rgba(166, 212, 255, 0.12), transparent 34%),
    radial-gradient(circle at 22% 88%, rgba(94, 180, 245, 0.1), transparent 28%);
  filter: blur(36px);
  opacity: .78;
  animation: light-aurora 24s ease-in-out infinite alternate;
}

.app-sidebar {
  width: 200px;
  background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-2) 100%);
  color: var(--sidebar-text);
  padding: 14px 10px;
  border-right: 1px solid rgba(255, 255, 255, .12);
  transition: width .24s ease, padding .24s ease;
}

.brand-wrap {
  padding: 12px 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  margin-bottom: 10px;
}

.brand-top {
  display: flex;
  justify-content: flex-end;
}

.sidebar-toggle-btn {
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .08);
  color: #ffffff;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: .2s ease;
}

.sidebar-toggle-btn:hover {
  background: rgba(255, 255, 255, .16);
}

.brand-image-wrap {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.brand-image {
  width: 176px;
  max-width: 100%;
  height: auto;
  display: block;
}

.brand-title {
  font-weight: 700;
  margin-top: 8px;
  text-align: center;
}

.brand-sub {
  font-size: 12px;
  opacity: .75;
  text-align: center;
}

.sidebar-nav .nav-link {
  outline: 0 !important;
  border: 0 !important;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin: 0;
  padding: 0;
  cursor: pointer;
  transition: transform .3s ease, background-color .3s ease, box-shadow .3s ease, color .3s ease;
}

.sidebar-nav {
  display: flex;
  width: 100%;
  max-width: 250px;
  min-height: 40px;
  align-items: center;
  justify-content: space-around;
  border-radius: 10px;
  background-color: #000;
  padding: 4px;
  margin: 4px auto 0;
  gap: 6px;
}

.sidebar-nav .nav-link:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, .1);
}

.sidebar-nav .nav-link.active {
  background: linear-gradient(135deg, #2f66d4, #3d80ff);
  color: #fff;
  box-shadow: 0 8px 16px rgba(23, 79, 191, .42);
}

.sidebar-nav .nav-link .icon {
  font-size: 20px;
}

.app-shell.sidebar-collapsed .app-sidebar {
  width: 72px;
  padding: 10px 8px;
}

.app-shell.sidebar-collapsed .brand-top {
  justify-content: center;
}

.app-shell.sidebar-collapsed .brand-image {
  width: 38px;
}

.app-shell.sidebar-collapsed .brand-title,
.app-shell.sidebar-collapsed .brand-sub,
.app-shell.sidebar-collapsed .sidebar-nav .nav-link span {
  display: none;
}

.app-shell.sidebar-collapsed .sidebar-nav {
  width: 48px;
  max-width: 48px;
  min-height: auto;
  flex-direction: column;
  justify-content: flex-start;
  padding: 6px 4px;
  gap: 8px;
}

.app-shell.sidebar-collapsed .sidebar-nav .nav-link {
  text-align: center;
}

.app-shell.sidebar-collapsed .sidebar-nav .nav-link i {
  margin-right: 0 !important;
}

.app-main {
  flex: 1;
  min-width: 0;
}

.app-shell-topnav {
  display: block;
  min-height: 100vh;
}

.app-shell-topnav::before,
.app-shell-topnav::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.app-shell-topnav::before {
  z-index: -4;
  background:
    radial-gradient(circle at 12% 22%, rgba(47, 98, 255, .14) 0%, transparent 38%),
    radial-gradient(circle at 88% 18%, rgba(14, 165, 233, .12) 0%, transparent 36%),
    radial-gradient(circle at 60% 84%, rgba(200, 122, 49, .09) 0%, transparent 34%),
    radial-gradient(circle at 36% 62%, rgba(99, 102, 241, .09) 0%, transparent 30%);
  filter: blur(32px);
  opacity: .88;
  animation: topnav-bloom-drift 28s ease-in-out infinite alternate;
}

.app-shell-topnav::after {
  z-index: -3;
  background:
    radial-gradient(circle, rgba(47, 98, 255, .20) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(14, 165, 233, .14) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(47, 98, 255, .11) 0 1px, transparent 1.5px);
  background-size: 32px 32px, 50px 50px, 68px 68px;
  opacity: .35;
  animation: topnav-dots-drift 64s ease-in-out infinite alternate;
}

.app-main-topnav {
  width: 100%;
  min-height: 100vh;
  position: relative;
  isolation: isolate;
}

.app-main-topnav::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(47, 98, 255, .1) 0%, transparent 22%, rgba(14, 165, 233, .07) 50%, transparent 78%, rgba(47, 98, 255, .1) 100%),
    linear-gradient(rgba(47, 98, 255, .038) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 98, 255, .038) 1px, transparent 1px);
  background-size: 200% auto, 44px 44px, 44px 44px;
  opacity: .48;
  animation: topnav-grid-pan 52s linear infinite, topnav-soft-pulse 18s ease-in-out infinite alternate;
}

.app-main-topnav::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  transform-origin: 50% 50%;
  background:
    conic-gradient(from 0deg,
      transparent 0deg,
      rgba(47, 98, 255, .04) 30deg,
      rgba(14, 165, 233, .09) 42deg,
      transparent 56deg),
    radial-gradient(circle at 50% 50%, transparent 20%,   rgba(47, 98, 255, .042) 20.5%,  transparent 21%),
    radial-gradient(circle at 50% 50%, transparent 34%,   rgba(47, 98, 255, .036) 34.5%,  transparent 35%),
    radial-gradient(circle at 50% 50%, transparent 48%,   rgba(14, 165, 233, .030) 48.5%, transparent 49%),
    radial-gradient(circle at 50% 50%, transparent 62%,   rgba(14, 165, 233, .024) 62.5%, transparent 63%),
    radial-gradient(circle at 50% 50%, transparent 76%,   rgba(47,  98, 255, .018) 76.5%, transparent 77%),
    radial-gradient(circle at 50% 50%, transparent 90%,   rgba(14, 165, 233, .013) 90.5%, transparent 91%);
  background-size: 100vmax 100vmax;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: .72;
  animation: topnav-radar-spin 20s linear infinite, topnav-radar-pulse 7.5s ease-in-out infinite alternate;
}

@keyframes topnav-bloom-drift {
  0% {
    transform: translate3d(-2%, -1%, 0) scale(1);
    opacity: .92;
  }

  50% {
    transform: translate3d(2%, 1.5%, 0) scale(1.04);
    opacity: 1;
  }

  100% {
    transform: translate3d(-1%, 2%, 0) scale(1.08);
    opacity: .94;
  }
}

@keyframes topnav-dots-drift {
  from {
    background-position: 0 0, 14px 18px, 26px 8px;
  }

  50% {
    background-position: 120px -95px, -72px 64px, 88px -52px;
  }

  to {
    background-position: 230px -170px, -130px 105px, 150px -86px;
  }
}

@keyframes topnav-grid-pan {
  from {
    background-position: 0% 50%, 0 0, 0 0;
  }

  to {
    background-position: 220% 50%, 1700px -1400px, -1400px -900px;
  }
}

@keyframes topnav-soft-pulse {
  0% {
    opacity: .26;
  }

  50% {
    opacity: .44;
  }

  100% {
    opacity: .3;
  }
}

@keyframes topnav-radar-spin {
  from {
    transform: rotate(0deg) scale(1);
  }

  to {
    transform: rotate(360deg) scale(1.02);
  }
}

@keyframes topnav-radar-pulse {
  0% {
    opacity: .2;
  }

  50% {
    opacity: .42;
  }

  100% {
    opacity: .26;
  }
}

@keyframes topnav-light-flow {
  0% {
    transform: translate3d(-3%, -2%, 0) scale(1);
    opacity: .94;
  }

  50% {
    transform: translate3d(2%, 1%, 0) scale(1.05);
    opacity: 1;
  }

  100% {
    transform: translate3d(-1%, 2.5%, 0) scale(1.08);
    opacity: .96;
  }
}

@keyframes topnav-light-haze-drift {
  0% {
    background-position: 14% 16%, 84% 20%, 70% 82%, 50% 50%;
  }

  50% {
    background-position: 20% 22%, 78% 26%, 62% 74%, 52% 48%;
  }

  100% {
    background-position: 26% 28%, 70% 34%, 54% 66%, 54% 46%;
  }
}

@keyframes topnav-light-grid-drift {
  0% {
    background-position: 0% 0%, 0 0, 50% 50%;
  }

  50% {
    background-position: 110% 34%, 420px -280px, 52% 48%;
  }

  100% {
    background-position: 190% 58%, 780px -520px, 54% 46%;
  }
}

@keyframes topnav-light-ring-sweep {
  from {
    transform: rotate(0deg) scale(1);
  }

  50% {
    transform: rotate(180deg) scale(1.04);
  }

  to {
    transform: rotate(360deg) scale(1.01);
  }
}

.topbar {
  height: 58px;
  background: linear-gradient(180deg, rgba(249, 252, 255, .98), rgba(236, 244, 255, .95));
  border: 1px solid rgba(171, 193, 229, .74);
  border-radius: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .96), 0 12px 24px rgba(39, 67, 110, .16);
  backdrop-filter: blur(12px);
}

.topbar-nav-layout {
  height: auto;
  min-height: calc(var(--topbar-logo-size) + 16px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 16px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar-brand {
  width: calc(var(--topbar-logo-size) + 8px);
  height: calc(var(--topbar-logo-size) + 8px);
  position: relative;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(231, 241, 255, .9));
  border: 1px solid rgba(146, 173, 216, .6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .96), 0 8px 16px rgba(47, 76, 121, .14);
  text-decoration: none;
  overflow: hidden;
}

.topbar-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  display: block;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.topbar-logo-light {
  opacity: 1;
  object-fit: contain;
  object-position: center center;
  transform: scale(.9);
  transform-origin: center center;
}

html:not(.theme-dark) .topbar-logo-light {
  transform: scale(0.92);
}

.topbar-logo-dark {
  opacity: 0;
  object-fit: contain;
  object-position: center center;
  transform: scale(.9);
  transform-origin: center center;
}

html.theme-dark .topbar-logo-light {
  opacity: 0;
}

html.theme-dark .topbar-logo-dark {
  opacity: 1;
  transform: scale(1.08);
}

.topbar-title {
  font-weight: 600;
  color: #1f2d47;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .7);
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.topbar-users-btn,
.topbar-logout-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid rgba(137, 163, 207, .66);
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(236, 244, 255, .96));
  color: #2b436a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .94), 0 6px 14px rgba(52, 83, 128, .12);
  transition: transform .2s ease, filter .2s ease, border-color .2s ease;
}

.topbar-users-btn:hover,
.topbar-logout-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.topbar-users-btn.active {
  border-color: rgba(70, 107, 172, .72);
  color: #1f3f72;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .96), 0 8px 16px rgba(40, 73, 123, .2);
}

.topbar-theme-toggle {
  border: 1px solid rgba(137, 163, 207, .66);
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(236, 244, 255, .96));
  color: #223750;
  border-radius: 999px;
  padding: .3rem .72rem .3rem .38rem;
  font-size: .76rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  transition: .2s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .94), 0 6px 14px rgba(52, 83, 128, .16);
}

.topbar-theme-toggle:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.topbar-theme-toggle .theme-toggle-orb {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #102649 0%, #1d4275 100%);
  color: #f4f8ff;
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .2), 0 6px 12px rgba(19, 45, 96, .26);
  transition: .22s ease;
}

.topbar-theme-toggle:hover .theme-toggle-orb {
  transform: translateY(-1px) rotate(-6deg);
}

.topbar-theme-toggle .theme-toggle-icon {
  font-size: .86rem;
}

.topbar-theme-toggle .theme-toggle-text {
  display: inline-block;
}

.topbar-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #223750;
}

.top-nav-menu {
  display: flex;
  background: linear-gradient(180deg, rgba(244, 249, 255, .98), rgba(222, 234, 252, .96));
  width: auto;
  min-width: 236px;
  height: 52px;
  align-items: center;
  justify-content: space-around;
  border-radius: 999px;
  border: 1px solid rgba(140, 166, 210, .74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .96), inset 0 -1px 0 rgba(112, 143, 197, .24), 0 10px 18px rgba(44, 73, 120, .22);
  padding: 4px 8px;
  margin: 0;
  gap: 8px;
}

.top-nav-menu-final {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: .35rem .45rem;
  margin: 0;
  border-radius: 16px;
  border: 1px solid rgba(223, 230, 240, .92);
  background: #fff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .075);
}

.top-nav-menu-final .action-link {
  display: inline-flex;
  justify-content: flex-start;
  align-items: center;
  width: 66px;
  min-width: 66px;
  height: 42px;
  border-radius: 10px;
  position: relative;
  z-index: 1;
  overflow: hidden;
  transform-origin: center left;
  transition: width .2s ease-in, transform .2s ease, box-shadow .2s ease, border-color .2s ease, background-color .2s ease, color .2s ease;
  text-decoration: none;
  color: #111;
  opacity: 1;
  font-size: .76rem;
  font-weight: 600;
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  gap: 8px;
  padding: 0 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95);
}

.top-nav-menu-final .action-link::before {
  position: absolute;
  z-index: -1;
  content: "";
  display: block;
  border-radius: 10px;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  transform: translateX(100%);
  transition: transform .2s ease-in;
  transform-origin: center right;
  background-color: #e5e7eb;
}

.top-nav-menu-final .action-link:hover,
.top-nav-menu-final .action-link:focus-visible {
  width: 140px;
  transform: translateY(-1px);
  color: #0f172a;
  outline: 0;
}

.top-nav-menu-final .action-link:hover::before,
.top-nav-menu-final .action-link:focus-visible::before {
  transform: translateX(0);
}

.top-nav-menu-final .action-link.active {
  color: #0f172a;
  border-color: rgba(120, 151, 204, .9);
  background: linear-gradient(180deg, rgba(255, 255, 255, .99), rgba(236, 244, 255, .96));
  box-shadow: 0 10px 18px rgba(37, 99, 235, .16), inset 0 1px 0 rgba(255, 255, 255, .98);
}

.top-nav-menu-final .action-link.active::before {
  transform: translateX(0);
  background: linear-gradient(180deg, rgba(227, 238, 255, .98), rgba(212, 228, 252, .9));
}

.top-nav-menu-final .action-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 22px;
  font-size: 1rem;
}

.top-nav-menu-final .action-icon-home {
  color: #2563eb;
}

.top-nav-menu-final .action-icon-gastos {
  color: #b45309;
}

.top-nav-menu-final .link-title {
  white-space: nowrap;
  display: block;
  text-align: left;
  line-height: 1;
  letter-spacing: .01em;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-width .2s ease-in, opacity .2s ease-in;
}

.top-nav-menu-final .action-link:hover .link-title,
.top-nav-menu-final .action-link:focus-visible .link-title {
  max-width: 140px;
  opacity: 1;
}

.top-nav-menu-final .action-link:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 .2rem rgba(59, 130, 246, .2);
}

.top-nav-menu .menu-bubbles,
.top-nav-menu .nav-link {
  outline: 0 !important;
  border: 0 !important;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #23416f;
  margin: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  transition: transform .24s ease, background-color .24s ease, box-shadow .24s ease;
}

.top-nav-menu .menu-bubbles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 7px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .98) 0%, rgba(223, 235, 252, .93) 100%);
  border: 1px solid rgba(125, 157, 206, .68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 4px 10px rgba(58, 87, 133, .18);
}

.top-nav-menu .menu-bubbles .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #4d79c0, #34588f);
  box-shadow: 0 0 0 1px rgba(201, 218, 244, .92), 0 0 10px rgba(97, 134, 199, .4);
  animation: menu-dot-float 2.6s ease-in-out infinite;
}

.top-nav-menu .menu-bubbles .dot:nth-child(2) {
  animation-delay: .18s;
}

.top-nav-menu .menu-bubbles .dot:nth-child(3) {
  animation-delay: .36s;
}

.top-nav-menu .menu-bubbles .dot:nth-child(4) {
  animation-delay: .54s;
}

.top-nav-menu .menu-link .menu-icon-chip {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  transition: .22s ease;
}

.top-nav-menu .menu-link-plan .menu-icon-chip {
  background: linear-gradient(165deg, rgba(63, 184, 116, .52) 0%, rgba(24, 123, 74, .54) 100%);
  border-color: rgba(47, 138, 87, .78);
  color: #35d589;
}

.top-nav-menu .menu-link-ejec .menu-icon-chip {
  background: linear-gradient(165deg, rgba(123, 158, 190, .56) 0%, rgba(84, 116, 146, .58) 100%);
  border-color: rgba(86, 119, 151, .82);
  color: #59c9ff;
}

.top-nav-menu .menu-link-gastos .menu-icon-chip {
  background: linear-gradient(165deg, rgba(222, 163, 98, .54) 0%, rgba(163, 106, 49, .58) 100%);
  border-color: rgba(170, 110, 52, .82);
  color: #f5a45a;
}

.top-nav-menu .nav-link:not(.active) .menu-icon-chip {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 3px 8px rgba(65, 90, 130, .2);
}

html:not(.theme-dark) .top-nav-menu .nav-link:not(.active).menu-link-plan .menu-icon-chip {
  color: #1f6b49;
}

html:not(.theme-dark) .top-nav-menu .nav-link:not(.active).menu-link-ejec .menu-icon-chip {
  color: #111111;
}

html:not(.theme-dark) .top-nav-menu .nav-link:not(.active).menu-link-gastos .menu-icon-chip {
  color: #7b4512;
}

.top-nav-menu .menu-bubbles:hover,
.top-nav-menu .nav-link:hover {
  transform: translateY(-3px);
  background: rgba(104, 133, 186, .24);
  box-shadow: inset 0 0 0 1px rgba(101, 131, 183, .34), 0 6px 12px rgba(55, 84, 130, .23);
}

.top-nav-menu .menu-bubbles:hover .dot {
  animation-duration: 1.2s;
}

.top-nav-menu .nav-link.active {
  background: linear-gradient(135deg, #2f62ff, #335fcc);
  color: #fff;
  box-shadow: 0 9px 18px rgba(33, 67, 128, .42), 0 0 0 2px rgba(112, 146, 214, .55);
}

.top-nav-menu .menu-bubbles.active {
  background: linear-gradient(135deg, #2f62ff, #335fcc);
  border-color: rgba(78, 113, 183, .86);
  box-shadow: 0 9px 18px rgba(33, 67, 128, .42), 0 0 0 2px rgba(112, 146, 214, .55);
}

.top-nav-menu .menu-bubbles.active .dot {
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 0 0 1px rgba(223, 235, 255, .88), 0 0 11px rgba(255, 255, 255, .55);
}

.top-nav-menu .nav-link.active .menu-icon-chip {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 10px 16px rgba(20, 58, 117, .35);
}

.top-nav-menu .menu-bubbles.rotate-in-animation {
  animation-duration: .44s;
}

.top-nav-menu .menu-bubbles.rotate-in-animation .dot {
  animation-duration: .95s;
}

.top-nav-menu .icon {
  font-size: 15px;
}

.top-nav-menu .nav-link:focus-visible {
  box-shadow: 0 0 0 .2rem rgba(47, 98, 255, .4);
}

@keyframes menu-dot-float {

  0%,
  100% {
    transform: translateY(0);
    opacity: .88;
  }

  50% {
    transform: translateY(-2px);
    opacity: 1;
  }
}

/* ----------------------------------------------------------
   Light mode top menu: viscous / amalgam experimental style
   ---------------------------------------------------------- */
html:not(.theme-dark) .top-nav-menu {
  position: relative;
  padding: 6px 10px;
  gap: 10px;
  min-width: 248px;
  height: 58px;
  border-radius: 999px;
  border: 1px solid rgba(191, 204, 224, .9);
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(239, 245, 255, .96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .98),
    inset 0 -1px 0 rgba(170, 187, 216, .35),
    0 14px 24px rgba(43, 69, 113, .2);
}

html:not(.theme-dark) .top-nav-menu::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(236, 243, 255, .9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .96);
  pointer-events: none;
}

html:not(.theme-dark) .top-nav-menu .menu-bubbles,
html:not(.theme-dark) .top-nav-menu .nav-link {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  z-index: 1;
  background: rgba(255, 255, 255, .92);
  color: #162c4a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    0 7px 14px rgba(56, 84, 129, .2);
  transition: transform .34s cubic-bezier(.5, 0, .1, 1), box-shadow .24s ease, background-color .24s ease, color .24s ease;
}

html:not(.theme-dark) .top-nav-menu .menu-bubbles {
  border: 1px solid rgba(160, 181, 212, .72);
}

html:not(.theme-dark) .top-nav-menu .menu-link .menu-icon-chip {
  width: 31px;
  height: 31px;
  border-radius: 999px;
}

html:not(.theme-dark) .top-nav-menu .menu-bubbles:hover,
html:not(.theme-dark) .top-nav-menu .nav-link:hover {
  transform: translateY(-7px) scale(1.06);
  background: rgba(255, 255, 255, .98);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    0 14px 22px rgba(39, 68, 115, .26);
}

html:not(.theme-dark) .top-nav-menu .nav-link.active,
html:not(.theme-dark) .top-nav-menu .menu-bubbles.active {
  transform: translateY(-4px);
  border-color: rgba(77, 112, 173, .82);
  box-shadow:
    0 12px 20px rgba(39, 68, 115, .3),
    0 0 0 2px rgba(129, 162, 219, .5);
}

html:not(.theme-dark) .top-nav-menu .nav-link.active {
  background: rgba(255, 255, 255, .99);
  color: #162c4a;
}

html:not(.theme-dark) .top-nav-menu .menu-bubbles.active {
  background: rgba(255, 255, 255, .99);
}

html:not(.theme-dark) .top-nav-menu .menu-bubbles.active .dot {
  background: linear-gradient(180deg, #ff8e5f, #ff3c00);
  box-shadow: 0 0 0 1px rgba(255, 215, 202, .9), 0 0 12px rgba(255, 95, 44, .45);
}

html:not(.theme-dark) .top-nav-menu .nav-link.active .menu-icon-chip {
  border-color: rgba(130, 161, 213, .78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .88),
    0 8px 14px rgba(45, 74, 120, .22);
}

html:not(.theme-dark) .top-nav-menu .menu-link .icon {
  opacity: 1;
  color: currentColor;
}

html:not(.theme-dark) .top-nav-menu .menu-link-plan.active .menu-icon-chip {
  color: #1c8b56;
}

html:not(.theme-dark) .top-nav-menu .menu-link-ejec.active .menu-icon-chip {
  color: #195a97;
}

html:not(.theme-dark) .top-nav-menu .menu-link-gastos.active .menu-icon-chip {
  color: #a45c12;
}

html:not(.theme-dark) .top-nav-menu-final {
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(241, 246, 252, .95));
  border-color: rgba(215, 224, 236, .92);
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #2f62ff;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}

.content-wrap {
  padding: 12px;
}

.login-page {
  min-height: 100vh;
  font-family: "Poppins", "Segoe UI", sans-serif;
  background: #040911;
  color: #e8f0ff;
  overflow: hidden;
  position: relative;
}

.login-page::before,
.login-page::after {
  display: none;
}

.login-aerosol-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 18% 28%, rgba(0, 224, 255, .2) 0%, transparent 42%),
    radial-gradient(circle at 82% 72%, rgba(255, 88, 88, .12) 0%, transparent 46%),
    radial-gradient(circle at 50% 52%, rgba(14, 22, 36, .95) 0%, #040911 100%);
  filter: blur(44px) saturate(112%);
  animation: login-aerosol-drift 20s ease-in-out infinite alternate;
}

@keyframes login-aerosol-drift {
  0% {
    transform: scale(1) translate3d(0, 0, 0);
  }

  100% {
    transform: scale(1.08) translate3d(2%, 2%, 0);
  }
}

.login-lens {
  position: fixed;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(circle, rgba(255, 255, 255, .1) 0%, transparent 68%);
  mix-blend-mode: screen;
  opacity: .85;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
  position: relative;
  z-index: 3;
}

.login-prism-wrap {
  width: min(450px, 100%);
  position: relative;
}

.login-crystal {
  position: absolute;
  border: 1px solid rgba(215, 229, 255, .2);
  backdrop-filter: blur(14px) saturate(120%);
  background: linear-gradient(145deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .01));
  z-index: 1;
  pointer-events: none;
  transition: transform .45s cubic-bezier(.22, .61, .36, 1);
}

.login-crystal-1 {
  width: 240px;
  height: 240px;
  top: -52px;
  left: -74px;
  transform: rotate(14deg);
  clip-path: polygon(22% 0%, 100% 18%, 82% 100%, 0% 84%);
}

.login-crystal-2 {
  width: 210px;
  height: 300px;
  bottom: -74px;
  right: -86px;
  transform: rotate(-12deg);
  clip-path: polygon(0% 14%, 86% 0%, 100% 86%, 12% 100%);
}

.login-card {
  width: min(450px, 100%);
  border: 1px solid rgba(198, 215, 246, .26);
  border-radius: 22px;
  padding: 30px 26px 24px;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, .1) 0%, rgba(255, 255, 255, .02) 42%, rgba(255, 255, 255, .04) 100%),
    rgba(7, 13, 26, .78);
  color: #e7efff;
  box-shadow:
    0 28px 56px rgba(0, 0, 0, .48),
    inset 0 1px 0 rgba(223, 234, 255, .22),
    inset 0 -1px 0 rgba(8, 16, 30, .56);
  backdrop-filter: blur(24px);
  position: relative;
  z-index: 3;
  animation: login-entry .72s cubic-bezier(.16, 1, .3, 1);
}

@keyframes login-entry {
  from {
    opacity: 0;
    transform: translateY(26px) skewX(-1.2deg);
  }

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

.login-kicker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.login-kicker {
  font-family: "JetBrains Mono", "Fira Code", monospace;
  letter-spacing: .24em;
  text-transform: uppercase;
  font-size: .66rem;
  font-weight: 600;
  color: rgba(120, 225, 255, .88);
}

.login-source-chip {
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: .64rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  border: 1px solid rgba(126, 168, 232, .45);
  border-radius: 999px;
  padding: .2rem .56rem;
  background: rgba(15, 36, 71, .38);
  color: #d8e8ff;
}

.login-brand {
  margin: 10px 0 12px;
  text-align: center;
}

.login-brand img {
  width: 124px;
  height: auto;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .44));
}

.login-title {
  margin: 0 0 2px;
  font-size: 2.06rem;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  line-height: 1.02;
  text-align: center;
  color: #f1f6ff;
  text-shadow: 0 0 22px rgba(66, 130, 244, .22);
}

.login-subtitle {
  margin: 8px auto 18px;
  color: #b9c9e6;
  font-size: .9rem;
  text-align: center;
  max-width: 35ch;
}

.login-form .form-label {
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: uppercase;
  font-size: .65rem;
  color: rgba(214, 227, 255, .82);
  margin-bottom: .5rem;
}

.login-field {
  position: relative;
}

.login-form .form-control {
  border: 0;
  border-bottom: 1px solid rgba(167, 189, 223, .3);
  background: transparent;
  color: #f3f7ff;
  border-radius: 0;
  padding: .58rem .1rem .62rem;
  box-shadow: none;
  transition: border-color .25s ease, padding-left .2s ease;
}

.login-form .form-control::placeholder {
  color: rgba(161, 181, 214, .58);
}

.login-form .form-control:focus {
  border-bottom-color: rgba(108, 213, 255, .9);
  box-shadow: none;
  background: transparent;
  color: #f8fbff;
  padding-left: .42rem;
}

.login-input-line {
  position: absolute;
  left: 0;
  right: auto;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #5ed7ff 0%, #f183c6 100%);
  transition: width .32s ease;
}

.login-form .form-control:focus+.login-input-line {
  width: 100%;
}

.login-alert {
  border-radius: 12px;
  border: 1px solid rgba(255, 112, 112, .45);
  background: rgba(111, 14, 25, .38);
  color: #ffd7dd;
}

.login-submit {
  border-radius: 14px;
  padding: .78rem .95rem;
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .74rem;
  background: linear-gradient(135deg, rgba(28, 46, 80, .74), rgba(8, 25, 54, .8));
  border: 1px solid rgba(160, 191, 240, .4);
  color: #edf4ff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 24px rgba(5, 18, 45, .44);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.login-submit::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 -120%;
  width: 65%;
  background: linear-gradient(90deg, transparent, rgba(93, 225, 255, .24), transparent);
  transition: transform .5s ease;
}

.login-submit:hover {
  transform: translateY(-2px);
  border-color: rgba(108, 219, 255, .68);
  box-shadow: 0 20px 28px rgba(4, 20, 47, .54), 0 0 24px rgba(76, 188, 255, .2);
  color: #f6fbff;
}

.login-submit:hover::before {
  transform: translateX(280%);
}

.login-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-meta-note {
  color: #99acd1;
}

.login-meta-status {
  font-family: "JetBrains Mono", "Fira Code", monospace;
  text-transform: uppercase;
  font-size: .62rem;
  letter-spacing: .1em;
  color: rgba(186, 207, 241, .92);
}

@media (max-width: 575.98px) {
  .login-prism-wrap {
    width: min(94vw, 420px);
  }

  .login-card {
    padding: 22px 18px 20px;
    border-radius: 18px;
  }

  .login-title {
    font-size: 1.7rem;
  }

  .login-crystal-1,
  .login-crystal-2,
  .login-lens {
    display: none;
  }
}

.dashboard-home-page .dashboard-toolbar {
  margin-left: auto;
}

.dashboard-home-page .dashboard-toolbar .form-control,
.dashboard-home-page .dashboard-toolbar .form-select {
  min-width: 160px;
}

.dash-stat-card {
  position: relative;
  border: 1px solid rgba(61, 97, 156, .36);
  border-radius: 16px;
  padding: 13px 14px;
  min-height: 108px;
  box-shadow: 0 12px 20px rgba(29, 50, 83, .16);
  overflow: hidden;
  color: #fff;
}

.dash-stat-card.is-clickable {
  cursor: pointer;
  transition: transform .2s ease, box-shadow .22s ease, border-color .22s ease;
}

.dash-stat-card.is-clickable:focus-visible {
  outline: none;
  border-color: rgba(255, 255, 255, .92);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .24), 0 14px 28px rgba(29, 50, 83, .22);
}

.dash-stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, 0) 58%);
  pointer-events: none;
}

.dash-stat-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, .95);
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
}

.dash-stat-icon i {
  display: inline-block;
  transform-origin: center;
}

.dash-stat-card .dash-stat-label {
  font-size: .76rem;
  color: rgba(236, 244, 255, .9);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 700;
}

.dash-stat-card .dash-stat-value {
  margin-top: 4px;
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
}

.dash-stat-card .dash-stat-meta {
  font-size: .8rem;
  color: rgba(229, 238, 252, .88);
}

.dash-stat-card .dash-stat-meta span {
  color: #fff;
  font-weight: 800;
}

.dash-stat-card.stat-plan {
  background: linear-gradient(142deg, #1a3a6c 0%, #2563eb 52%, #3b7af2 100%);
}

.dash-stat-card.stat-transfer {
  background: linear-gradient(142deg, #0c4a6e 0%, #0369a1 54%, #0891b2 100%);
}

.dash-stat-card.stat-executed {
  background: linear-gradient(142deg, #7c2d12 0%, #c05621 54%, #ea7a3e 100%);
}

.dash-stat-card.stat-approved {
  background: linear-gradient(142deg, #14532d 0%, #16a34a 54%, #22c55e 100%);
}

@media (hover: hover) and (pointer: fine) {
  .dashboard-home-page .dash-stat-card.is-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 30px rgba(27, 52, 92, .22);
    border-color: rgba(255, 255, 255, .52);
  }
}

.dash-calendar-head {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 0;
}

.dash-calendar-head span {
  text-align: center;
  padding: 8px 6px;
  font-size: .76rem;
  font-weight: 700;
  color: #63789c;
  text-transform: none;
  letter-spacing: .02em;
}

.dash-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
}

.dash-day-cell {
  border: 0;
  border-right: 1px solid rgba(183, 199, 226, .62);
  border-bottom: 1px solid rgba(183, 199, 226, .62);
  border-radius: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(248, 252, 255, .92));
  min-height: 86px;
  text-align: left;
  padding: 6px 7px;
  cursor: pointer;
  transition: background .14s ease, box-shadow .16s ease;
}

.dash-day-cell:hover {
  background: rgba(232, 241, 255, .72);
  box-shadow: inset 0 0 0 1px rgba(94, 129, 193, .32);
}

.dash-day-cell.is-out {
  opacity: .58;
}

.dash-day-cell.is-today {
  box-shadow: inset 0 0 0 1.5px rgba(47, 98, 255, .62);
}

.dash-day-cell.is-selected {
  background: rgba(226, 238, 255, .9);
  box-shadow: inset 0 0 0 2px rgba(47, 98, 255, .44);
}

.dash-day-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.dash-day-num {
  font-size: .9rem;
  font-weight: 700;
  color: #233757;
}

.dash-day-count {
  border-radius: 999px;
  padding: 1px 7px;
  font-size: .68rem;
  font-weight: 700;
  color: #1f4183;
  background: rgba(61, 111, 201, .16);
  border: 1px solid rgba(92, 129, 194, .4);
}

.dash-day-events {
  display: grid;
  gap: 4px;
}

.dash-day-event {
  border-radius: 8px;
  font-size: .65rem;
  font-weight: 700;
  padding: 1px 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-day-event.can-execute {
  cursor: pointer;
  border: 1px dashed rgba(65, 99, 156, .44);
}

.dash-day-event.can-execute:hover {
  box-shadow: inset 0 0 0 1px rgba(42, 92, 177, .3);
}

.dash-day-event.is-planned {
  color: #214a87;
  background: rgba(57, 106, 199, .16);
}

.dash-day-event.is-executed {
  color: #11694c;
  background: rgba(28, 163, 117, .2);
}

.dash-day-event.is-relegada {
  color: #8a2e17;
  background: rgba(205, 86, 43, .2);
}

.dash-day-more {
  font-size: .66rem;
  color: #6f84a8;
  font-weight: 700;
}

.dash-context-menu {
  position: fixed;
  z-index: 1200;
  min-width: 132px;
  border-radius: 12px;
  border: 1px solid rgba(141, 150, 166, .55);
  background: linear-gradient(180deg, rgba(242, 244, 248, .98), rgba(233, 236, 242, .98));
  box-shadow: 0 16px 34px rgba(51, 59, 74, .26), 0 2px 0 rgba(255, 255, 255, .6) inset;
  overflow: hidden;
  display: none;
  padding: 3px 0;
}

.dash-context-menu::after {
  content: "";
  position: absolute;
  left: 16px;
  bottom: -5px;
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, rgba(233, 236, 242, .98), rgba(226, 230, 237, .98));
  border-right: 1px solid rgba(141, 150, 166, .55);
  border-bottom: 1px solid rgba(141, 150, 166, .55);
  transform: rotate(45deg);
  border-bottom-right-radius: 3px;
}

.dash-context-menu.show {
  display: block;
}

.dash-context-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 9px 3px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #2f3338;
}

.dash-context-title i {
  font-size: .68rem;
  color: #2f3338;
}

.dash-context-divider {
  margin: 1px 8px 3px;
  height: 1px;
  background: rgba(120, 130, 145, .32);
}

.dash-context-item {
  width: 100%;
  border: 0;
  background: transparent;
  display: block;
  padding: 5px 9px;
  font-size: .72rem;
  line-height: 1.2;
  font-weight: 600;
  color: #2f3338;
  text-align: left;
  transition: background .14s ease, color .14s ease, transform .12s ease;
}

.dash-context-item:hover {
  background: rgba(189, 198, 213, .28);
  color: #1f2328;
  transform: translateX(1px);
}

.dash-day-modal-content {
  border: 1px solid rgba(162, 182, 214, .74);
  border-radius: 16px;
  overflow: hidden;
}

#dashDayActivitiesModal {
  z-index: 2105;
}

body.dash-day-modal-open .modal-backdrop.show {
  z-index: 2100;
}

.dash-day-modal-date {
  font-size: .9rem;
  font-weight: 700;
  color: #355180;
  margin-bottom: 10px;
}

.dash-day-modal-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: min(62vh, 560px);
  overflow: auto;
  padding-right: 2px;
}

.dash-day-modal-empty {
  border: 1px dashed rgba(161, 181, 214, .72);
  border-radius: 12px;
  padding: 12px;
  background: rgba(244, 249, 255, .72);
}

.dash-day-modal-item {
  border: 1px solid rgba(174, 192, 220, .74);
  border-left: 3px solid rgba(84, 124, 194, .7);
  border-radius: 12px;
  padding: 10px 11px;
  background: linear-gradient(180deg, rgba(252, 254, 255, .96), rgba(244, 249, 255, .94));
}

.dash-day-modal-item.is-executed {
  border-left-color: rgba(60, 156, 121, .78);
}

.dash-day-modal-item.is-relegada {
  border-left-color: rgba(194, 100, 69, .8);
}

.dash-day-modal-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.dash-day-modal-time {
  font-size: .78rem;
  font-weight: 800;
  color: #3f5f90;
}

.dash-day-modal-client {
  font-size: .94rem;
  font-weight: 800;
  color: #1b345a;
}

.dash-day-modal-meta {
  font-size: .8rem;
  color: #4e6993;
  margin-top: 3px;
}

.dash-day-modal-pill {
  border-radius: 999px;
  padding: 3px 9px;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #225a43;
  background: rgba(214, 246, 233, .9);
  border: 1px solid rgba(74, 164, 125, .52);
  white-space: nowrap;
}

.dash-day-modal-item.is-planned .dash-day-modal-pill {
  color: #2d4f83;
  background: rgba(222, 234, 255, .92);
  border-color: rgba(94, 130, 193, .52);
}

.dash-day-modal-item.is-relegada .dash-day-modal-pill {
  color: #7e3018;
  background: rgba(255, 228, 220, .9);
  border-color: rgba(194, 104, 70, .56);
}

.dash-day-modal-pill.is-closed {
  color: #5f7090;
  background: rgba(228, 234, 244, .9);
  border-color: rgba(144, 161, 192, .5);
}

.dash-day-modal-actions {
  margin-top: 9px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.dash-calendar-panel .card-header {
  padding-top: 8px;
  padding-bottom: 8px;
}

/* ── UIverse-style calendar two-panel layout ─────────────── */
.dash-calendar-panel {
  overflow: hidden;
  padding: 0 !important; /* cancel cloud-card body padding when wrapper is inside */
}

.dash-cal-with-panel {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
}

/* Green left date panel */
.dash-cal-green-panel {
  flex: 0 0 130px;
  background: linear-gradient(160deg, #27ae60 0%, #1a8a48 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 22px 10px;
  text-align: center;
  border-top-left-radius: 13px;
  border-bottom-left-radius: 13px;
  position: relative;
  overflow: hidden;
}
.dash-cal-green-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 25% 30%, rgba(255,255,255,.14) 0%, transparent 60%);
  pointer-events: none;
}
.dash-cal-gp-num {
  font-size: 4.8rem;
  font-weight: 800;
  line-height: .85;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,.18);
  letter-spacing: -.04em;
}
.dash-cal-gp-day {
  font-size: 1.05rem;
  font-weight: 600;
  color: rgba(255,255,255,.9);
  text-transform: capitalize;
  margin-bottom: 4px;
}
.dash-cal-gp-sep {
  width: 55%;
  height: 1px;
  background: rgba(255,255,255,.3);
  margin: 6px 0;
}
.dash-cal-gp-label {
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.7);
  line-height: 1;
}
.dash-cal-gp-count {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  text-shadow: 0 1px 4px rgba(0,0,0,.15);
}

/* Right main panel */
.dash-cal-main {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.dash-cal-main .card-body {
  flex: 1 1 auto;
  padding-top: 8px;
  padding-bottom: 8px;
}
.dash-cal-main .dash-calendar-toolbar {
  border-top-left-radius: 0;
}

/* Today cell — green circle on date number */
.dash-day-cell.is-today {
  box-shadow: none;
}
.dash-day-cell.is-today .dash-day-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #2eca71;
  color: #fff;
  font-weight: 800;
  font-size: .82rem;
  box-shadow: 0 2px 8px rgba(39,174,96,.45);
}

/* Selected cell — outlined green circle */
.dash-day-cell.is-selected {
  background: rgba(226, 238, 255, .9);
  box-shadow: none;
}
.dash-day-cell.is-selected .dash-day-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid #27ae60;
  color: #1e8a48;
  font-weight: 800;
  font-size: .82rem;
}

/* Event dot — UIverse blue indicator */
.dash-day-cell .dash-day-count {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2980b9;
  border: none;
  padding: 0;
  flex-shrink: 0;
  font-size: 0;
  color: transparent;
  overflow: hidden;
  align-self: flex-start;
  margin-top: 2px;
}

/* Hide panel on very small screens */
@media (max-width: 500px) {
  .dash-cal-green-panel { display: none; }
  .dash-cal-main .dash-calendar-toolbar { border-top-left-radius: 13px; }
}

/* Dark mode */
html.theme-dark .dash-cal-green-panel {
  background: linear-gradient(160deg, #1e6e3a 0%, #145228 100%);
  border-right: 1px solid rgba(80,180,110,.15);
}
html.theme-dark .dash-day-cell.is-today .dash-day-num {
  background: #22a356;
  box-shadow: 0 2px 10px rgba(34,163,86,.5);
}
html.theme-dark .dash-day-cell.is-selected .dash-day-num {
  border-color: #22a356;
  color: #4ade80;
}
html.theme-dark .dash-day-cell .dash-day-count {
  background: #2e86c1;
}

/* ── END UIverse-style admin calendar ─────────────────────── */

.dash-calendar-toolbar {
  background: linear-gradient(180deg, rgba(239, 243, 249, .98), rgba(227, 234, 245, .95));
  border-bottom: 1px solid rgba(166, 182, 210, .74);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.dash-calendar-panel .card-body {
  padding-top: 8px;
  padding-bottom: 8px;
}

.dash-calendar-title {
  font-size: clamp(1.08rem, 1.45vw, 1.34rem);
  font-weight: 780;
  color: #1d314f;
  letter-spacing: .01em;
  padding: 2px 0;
}

.dash-calendar-shell {
  border: 1px solid rgba(178, 197, 226, .75);
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(246, 250, 255, .93));
}

.dash-calendar-shell .dash-calendar-head {
  border-bottom: 1px solid rgba(178, 197, 226, .75);
}

.dash-calendar-panel .dash-day-cell {
  min-height: 64px;
  padding: 4px 5px;
}

.dash-calendar-panel .dash-day-events {
  max-height: 34px;
  overflow: hidden;
}

.dash-calendar-panel .dash-day-event {
  font-size: .58rem;
  line-height: 1.2;
}

.dash-calendar-panel .dash-day-more {
  font-size: .56rem;
}

.dash-pending-card .card-body {
  max-height: 380px;
  overflow: hidden;
}

.dash-day-card .card-body {
  max-height: 260px;
  overflow: auto;
}

@media (min-width: 1200px) {
  .dashboard-main-top {
    align-items: stretch !important;
  }

  .dashboard-main-top>.col-xl-8 {
    display: flex;
  }

  .dashboard-main-top>.col-xl-8 .dash-calendar-panel {
    width: 100%;
    display: flex;
    flex-direction: column;
  }

  .dashboard-main-top>.col-xl-8 .dash-calendar-panel .card-body {
    flex: 1 1 auto;
  }

  .dashboard-main-top>.col-xl-4 {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .dashboard-main-top>.col-xl-4>.cloud-card {
    width: 100%;
  }

  .dashboard-main-top .dash-pending-card .card-body {
    flex: 1 1 auto;
    max-height: 100%;
    overflow: hidden;
  }

  .dashboard-main-top .dash-pending-card {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
  }

  .dashboard-main-top .dash-liquid-card {
    flex: 0 0 auto;
  }

}

.dash-calendar-shell .dash-day-cell:nth-child(7n) {
  border-right: 0;
}

.dash-calendar-shell .dash-day-cell:nth-last-child(-n + 7) {
  border-bottom: 0;
}

.dash-week-finance-card .card-body {
  padding-top: 10px;
  padding-bottom: 10px;
}

.dash-week-filter-bar {
  display: inline-flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.dash-week-filter-group {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  min-width: 148px;
}

.dash-week-filter-group .form-label {
  color: #5b729b;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  font-size: .66rem;
}

.dash-week-filter-group .form-select {
  min-width: 148px;
  border-color: rgba(166, 186, 216, .8);
  background: linear-gradient(180deg, rgba(250, 253, 255, .95), rgba(243, 248, 255, .92));
  color: #23406b;
  font-size: .78rem;
  font-weight: 600;
}

.dash-week-filter-group .form-select:focus {
  border-color: rgba(111, 143, 195, .84);
  box-shadow: 0 0 0 0.15rem rgba(103, 141, 204, .2);
}

#dashWeekRangeLabel {
  align-self: center;
}

.dash-week-compact-wrap {
  border: 1px solid rgba(170, 190, 219, .78);
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(252, 254, 255, .96), rgba(244, 249, 255, .95));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65), 0 8px 20px rgba(146, 169, 206, .12);
}

.dash-week-compact-table {
  margin: 0;
  font-size: .82rem;
  width: 100%;
  table-layout: fixed;
}

.dash-week-compact-table thead th {
  border-bottom: 1px solid rgba(147, 171, 208, .85);
  background: linear-gradient(180deg, rgba(227, 238, 255, .96), rgba(212, 227, 251, .9));
  color: #2b4878;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 800;
  font-size: .67rem;
  white-space: nowrap;
  vertical-align: middle;
  padding: .66rem .45rem;
}

.dash-week-col-chip {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
  border: 1px solid rgba(107, 138, 191, .58);
  background: linear-gradient(180deg, rgba(244, 248, 255, .99), rgba(224, 234, 252, .95));
  color: #2f4f82;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65), 0 3px 8px rgba(79, 110, 166, .18);
  vertical-align: middle;
}

.dash-week-col-chip i {
  font-size: .8rem;
  line-height: 1;
}

.dash-week-col-chip.is-fuel {
  color: #1f61d0;
  background: linear-gradient(180deg, rgba(224, 239, 255, .99), rgba(197, 221, 255, .94));
  border-color: rgba(76, 127, 210, .62);
}

.dash-week-col-chip.is-peaje {
  color: #5c5fd6;
  background: linear-gradient(180deg, rgba(237, 234, 255, .99), rgba(218, 211, 255, .93));
  border-color: rgba(113, 115, 207, .62);
}

.dash-week-col-chip.is-food {
  color: #1d9a74;
  background: linear-gradient(180deg, rgba(224, 252, 243, .99), rgba(196, 242, 225, .94));
  border-color: rgba(82, 172, 141, .62);
}

.dash-week-col-chip.is-hotel {
  color: #b2662a;
  background: linear-gradient(180deg, rgba(255, 243, 227, .99), rgba(251, 226, 196, .94));
  border-color: rgba(202, 138, 84, .62);
}

.dash-week-col-chip.is-extra {
  color: #be4a44;
  background: linear-gradient(180deg, rgba(255, 232, 228, .99), rgba(252, 208, 202, .94));
  border-color: rgba(208, 108, 102, .62);
}

.dash-week-col-chip.is-total {
  color: #275aab;
  background: linear-gradient(180deg, rgba(232, 243, 255, .99), rgba(204, 225, 255, .94));
  border-color: rgba(92, 141, 214, .62);
}

.dash-week-compact-table thead th:first-child {
  width: 128px;
  text-align: center;
}

.dash-week-compact-table tbody th {
  border-top-color: rgba(188, 204, 227, .58);
  background: rgba(237, 244, 255, .6);
  color: #28436d;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
  font-size: .68rem;
  vertical-align: middle;
  white-space: nowrap;
  text-align: center;
  padding: .72rem .45rem;
}

.dash-week-compact-table tbody td {
  border-top-color: rgba(188, 204, 227, .58);
  color: #203a61;
  font-weight: 750;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
  padding: .72rem .45rem;
}

.dash-week-compact-table tbody tr.is-plan td {
  background: rgba(238, 244, 255, .44);
}

.dash-week-compact-table tbody tr.is-transfer td {
  background: rgba(244, 238, 255, .42);
}

.dash-week-compact-table tbody tr.is-exec td {
  background: rgba(232, 245, 239, .42);
}

.dash-week-compact-table tbody tr.is-approved td {
  background: rgba(233, 247, 241, .5);
}

.dash-week-compact-table tbody tr.is-plan th {
  border-left: 3px solid rgba(86, 124, 193, .72);
}

.dash-week-compact-table tbody tr.is-transfer th {
  border-left: 3px solid rgba(126, 97, 191, .68);
}

.dash-week-compact-table tbody tr.is-exec th {
  border-left: 3px solid rgba(67, 149, 118, .72);
}

.dash-week-compact-table tbody tr.is-approved th {
  border-left: 3px solid rgba(54, 152, 112, .72);
}

.dash-week-compact-table tbody td.is-total,
.dash-week-compact-table tbody tr.is-plan td.is-total,
.dash-week-compact-table tbody tr.is-transfer td.is-total,
.dash-week-compact-table tbody tr.is-exec td.is-total,
.dash-week-compact-table tbody tr.is-approved td.is-total {
  font-weight: 900;
  color: #17365f;
  background: rgba(228, 238, 255, .75);
}

.dash-week-breakdown-table tbody tr.is-focused th,
.dash-week-breakdown-table tbody tr.is-focused td {
  box-shadow: inset 0 0 0 999px rgba(255, 255, 255, .18);
}

.dash-week-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-week-grid-head {
  display: grid;
  grid-template-columns: 1.2fr .9fr .9fr;
  gap: 8px 10px;
  align-items: center;
  font-size: .73rem;
  color: #5f7498;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(125, 146, 181, .45);
}

.dash-week-row {
  display: grid;
  grid-template-columns: 1.2fr .9fr .9fr;
  gap: 8px 10px;
  align-items: center;
  border-radius: 12px;
}

.dash-week-row-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .84rem;
  color: #2a4166;
  font-weight: 700;
}

.dash-week-row-icon {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  color: #2a4166;
  border: 1px solid rgba(126, 150, 187, .5);
  background: linear-gradient(180deg, rgba(242, 246, 255, .95), rgba(230, 238, 252, .9));
  flex: 0 0 auto;
}

.dash-week-row-icon.is-fuel {
  color: #3565b8;
}

.dash-week-row-icon.is-peaje {
  color: #5a63b8;
}

.dash-week-row-icon.is-food {
  color: #2d8c72;
}

.dash-week-row-icon.is-hotel {
  color: #98653a;
}

.dash-week-row-icon.is-extra {
  color: #a3564a;
}

.dash-week-row-icon.is-total {
  color: #324d7f;
}

.dash-week-row-value {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 26px;
  font-size: .84rem;
  color: #1c3456;
  font-weight: 700;
}

.dash-week-row-value[data-kind]::before {
  content: '';
  display: none;
}

.dash-week-row-label.is-total,
.dash-week-row-value.is-total {
  margin-top: 3px;
  padding-top: 6px;
  border-top: 1px solid rgba(130, 154, 191, .44);
  font-weight: 800;
  color: #152c4d;
}

.dash-week-diff-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dash-week-diff-badge {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .8rem;
  font-weight: 800;
  border: 1px solid rgba(124, 147, 184, .42);
  background: rgba(234, 241, 255, .72);
  color: #294878;
}

.dash-week-diff-badge.is-positive {
  color: #8d2a12;
  background: rgba(255, 229, 220, .84);
  border-color: rgba(206, 113, 86, .56);
}

.dash-week-diff-badge.is-negative {
  color: #116147;
  background: rgba(221, 246, 236, .84);
  border-color: rgba(67, 166, 126, .56);
}

.dash-week-diff-badge.is-neutral {
  color: #30527f;
  background: rgba(227, 236, 252, .74);
}

.dash-week-table-wrap {
  border-top: 1px solid rgba(182, 199, 224, .72);
}

.dash-week-summary-tools {
  justify-content: flex-end;
}

.dash-week-summary-tools .dash-lift-btn {
  position: relative;
  border-radius: 14px;
  padding: .48rem 1rem;
  min-height: 40px;
  letter-spacing: .01em;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.82),
    0 2px 0 rgba(145, 173, 214, .68),
    0 12px 22px rgba(34, 79, 145, .12);
}

.dash-week-summary-tools .dash-lift-btn::before {
  content: '';
  position: absolute;
  inset: 1px 1px auto 1px;
  height: 48%;
  border-radius: 13px 13px 10px 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.45), rgba(255,255,255,0));
  pointer-events: none;
}

.dash-week-summary-tools .dash-lift-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.86),
    0 2px 0 rgba(132, 166, 212, .66),
    0 16px 26px rgba(31, 76, 143, .16);
}

.dash-week-summary-tools .dash-lift-btn:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.75),
    0 1px 0 rgba(132, 166, 212, .58),
    0 6px 12px rgba(31, 76, 143, .1);
}

.dash-week-summary-tools .dash-lift-btn.dash-lift-btn-print {
  border-color: #0f70df;
  background: linear-gradient(180deg, #2f95ff 0%, #1a7ef0 100%);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.2),
    0 2px 0 rgba(59, 126, 214, .48),
    0 12px 22px rgba(17, 96, 203, .18);
}

.dash-week-summary-tools .dash-lift-btn.dash-lift-btn-print:hover {
  border-color: #0d67ce;
  background: linear-gradient(180deg, #45a1ff 0%, #2488fa 100%);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.24),
    0 2px 0 rgba(59, 126, 214, .44),
    0 16px 26px rgba(17, 96, 203, .22);
}

.dash-week-summary-tools .dash-lift-btn.dash-lift-btn-neutral {
  border-color: #a9c3eb;
  background: linear-gradient(180deg, #fbfdff 0%, #e7f0fe 100%);
  color: #27579d;
}

.dash-week-summary-tools .dash-lift-btn.dash-lift-btn-neutral:hover {
  border-color: #8fb3e3;
  background: linear-gradient(180deg, #fafdff 0%, #dceafe 100%);
  color: #1d4d90;
}

.dash-week-summary-tools #dashApproveWeekBtn.dash-lift-btn.is-disabled {
  transform: none;
  box-shadow: none;
}

#dashApproveWeekBtn.is-disabled {
  opacity: .68;
  box-shadow: none;
  cursor: not-allowed;
}

.dash-week-table {
  font-size: .81rem;
}

.dash-week-table thead th {
  border-bottom: 1px solid rgba(172, 192, 221, .78);
  background: linear-gradient(180deg, rgba(244, 248, 255, .92), rgba(235, 242, 254, .84));
  color: #355180;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 800;
  font-size: .68rem;
  white-space: nowrap;
}

.dash-week-table tbody td {
  border-top-color: rgba(188, 204, 227, .58);
  color: #233c60;
  vertical-align: middle;
  white-space: nowrap;
}

.dash-week-table tbody tr:hover td {
  background: rgba(230, 240, 255, .62);
}

.dash-week-table tbody tr.dash-week-total-row td {
  background: linear-gradient(180deg, rgba(236, 245, 255, .96), rgba(226, 238, 255, .92));
  border-top: 2px solid rgba(115, 146, 194, .55);
  color: #1f3d69;
}

.dash-week-table tbody tr.dash-week-group-row td {
  background: linear-gradient(180deg, rgba(241, 246, 255, .96), rgba(231, 239, 253, .92));
  border-top: 1px solid rgba(167, 188, 220, .62);
  font-weight: 700;
}

.dash-week-table tbody tr.dash-week-group-row:hover td {
  background: linear-gradient(180deg, rgba(234, 242, 255, .98), rgba(224, 235, 252, .94));
}

.dash-week-table tbody tr.dash-week-group-child-row td {
  background: rgba(249, 252, 255, .94);
}

.dash-week-table tbody tr.dash-week-group-child-row:hover td {
  background: rgba(238, 246, 255, .88);
}

.dash-week-group-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.dash-week-group-toggle {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(114, 147, 201, .58);
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(231, 240, 255, .95));
  color: #315f9f;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

.dash-week-group-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(44, 88, 159, .12);
}

.dash-week-group-copy {
  min-width: 0;
}

.dash-week-group-title {
  color: #1d355c;
  font-size: .8rem;
  font-weight: 800;
}

.dash-week-group-meta {
  color: #5b7398;
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.dash-week-group-child-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 36px;
  color: #3d5a86;
  font-weight: 700;
}

.dash-week-group-child-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #7ea9e8;
  box-shadow: 0 0 0 3px rgba(126, 169, 232, .16);
}

.dash-approval-cell-group {
  min-width: 150px;
}

.dash-week-inline-approve {
  min-width: 118px;
}

.dash-week-inline-approve.is-disabled {
  opacity: .62;
  box-shadow: none;
  cursor: not-allowed;
}


.dash-day-view-card {
  scroll-margin-top: 82px;
}

.dash-day-table-wrap {
  border-top: 1px solid rgba(182, 199, 224, .72);
}

.dash-day-table {
  font-size: .81rem;
}

.dash-day-table thead th {
  border-bottom: 1px solid rgba(172, 192, 221, .78);
  background: linear-gradient(180deg, rgba(241, 246, 255, .94), rgba(232, 240, 254, .86));
  color: #355180;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 800;
  font-size: .68rem;
  white-space: nowrap;
}

.dash-day-table tbody td {
  border-top-color: rgba(188, 204, 227, .58);
  color: #233c60;
  vertical-align: middle;
  white-space: nowrap;
}

.dash-day-table tbody tr:hover td {
  background: rgba(230, 240, 255, .56);
}

.dash-state-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.dash-state-pill.is-planificada {
  background: rgba(56, 103, 187, .16);
  border: 1px solid rgba(71, 114, 193, .48);
  color: #20487e;
}

.dash-state-pill.is-ejecutada {
  background: rgba(27, 137, 98, .16);
  border: 1px solid rgba(48, 149, 113, .5);
  color: #125e45;
}

.dash-state-pill.is-relegada {
  background: rgba(203, 91, 53, .16);
  border: 1px solid rgba(194, 88, 52, .5);
  color: #8c341d;
}

.dash-day-action-btn {
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 9px;
}

@keyframes dash-day-focus {
  0% {
    box-shadow: 0 0 0 0 rgba(55, 102, 188, 0);
  }

  30% {
    box-shadow: 0 0 0 3px rgba(55, 102, 188, .28);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(55, 102, 188, 0);
  }
}

.dash-day-view-flash {
  animation: dash-day-focus .75s ease;
}

.dash-liquid-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(142, 164, 203, .62);
  border-radius: 14px;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(244, 248, 255, .88), rgba(234, 242, 252, .86));
}

.dash-liquid-status.is-open {
  border-color: rgba(77, 126, 198, .58);
  background: linear-gradient(180deg, rgba(234, 243, 255, .92), rgba(220, 234, 251, .9));
}

.dash-liquid-status.is-overdue {
  border-color: rgba(181, 97, 77, .58);
  background: linear-gradient(180deg, rgba(255, 236, 230, .9), rgba(250, 224, 213, .88));
}

.dash-liquid-status.is-closed {
  border-color: rgba(61, 132, 95, .58);
  background: linear-gradient(180deg, rgba(230, 252, 240, .9), rgba(210, 241, 225, .88));
}

.dash-liquid-title {
  font-size: .88rem;
  font-weight: 800;
  color: #20395f;
}

.dash-liquid-meta {
  margin-top: 3px;
  font-size: .8rem;
  color: #516b94;
}

.dash-liquid-countdown {
  border-radius: 12px;
  padding: 8px 12px;
  background: rgba(41, 84, 154, .12);
  border: 1px solid rgba(72, 112, 178, .42);
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: .95rem;
  font-weight: 900;
  color: #1f3f72;
  letter-spacing: .03em;
  white-space: nowrap;
  transition: background .22s ease, border-color .22s ease, color .22s ease, box-shadow .22s ease;
}

.dash-liquid-status.is-open .dash-liquid-countdown {
  background: linear-gradient(180deg, rgba(225, 237, 255, .96), rgba(206, 224, 252, .92));
  border-color: rgba(77, 123, 198, .64);
  color: #1a4f96;
  box-shadow: 0 0 0 0 rgba(61, 120, 210, .18);
  animation: dash-liquid-count-open 1.9s ease-in-out infinite;
}

.dash-liquid-status.is-overdue .dash-liquid-countdown {
  background: linear-gradient(180deg, rgba(255, 233, 227, .96), rgba(252, 214, 201, .93));
  border-color: rgba(190, 99, 76, .64);
  color: #8f2f1c;
  box-shadow: 0 0 0 0 rgba(181, 86, 62, .16);
  animation: dash-liquid-count-overdue 1.5s ease-in-out infinite;
}

.dash-liquid-status.is-closed .dash-liquid-countdown {
  background: linear-gradient(180deg, rgba(225, 248, 236, .96), rgba(203, 238, 219, .92));
  border-color: rgba(65, 146, 103, .64);
  color: #10633f;
  box-shadow: 0 0 0 0 rgba(56, 138, 93, .14);
}

@keyframes dash-liquid-count-open {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(61, 120, 210, .12);
    filter: saturate(1);
  }

  50% {
    box-shadow: 0 0 0 5px rgba(61, 120, 210, .18);
    filter: saturate(1.08);
  }
}

@keyframes dash-liquid-count-overdue {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(181, 86, 62, .1);
    filter: saturate(1);
  }

  50% {
    box-shadow: 0 0 0 5px rgba(181, 86, 62, .18);
    filter: saturate(1.1);
  }
}

.dash-approval-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: rgba(38, 138, 101, .17);
  border: 1px solid rgba(56, 150, 114, .54);
  color: #136047;
}

.dash-approval-pill.is-pending {
  background: rgba(236, 171, 80, .2);
  border-color: rgba(182, 123, 37, .56);
  color: #7a4b12;
}

.dash-approval-pill.is-positive {
  background: rgba(255, 232, 222, .92);
  border-color: rgba(196, 103, 79, .56);
  color: #8f341d;
}

.dash-approval-pill.is-negative {
  background: rgba(222, 247, 235, .9);
  border-color: rgba(69, 151, 117, .56);
  color: #145c43;
}

.dash-approval-pill.is-neutral {
  background: rgba(227, 236, 251, .9);
  border-color: rgba(105, 133, 176, .52);
  color: #2f4f7a;
}

.dash-approval-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 116px;
}

.dash-approval-action-btn {
  min-width: 94px;
}

.dash-approval-value {
  font-size: .7rem;
  font-weight: 800;
  color: #3b5b8f;
}

.dash-order-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .04em;
  border: 1px solid rgba(100, 129, 176, .5);
  background: rgba(225, 234, 247, .82);
  color: #27456f;
}

.dash-order-chip.is-missing {
  border-color: rgba(184, 119, 88, .5);
  background: rgba(252, 232, 223, .9);
  color: #8a4022;
}

.dash-approval-modal-content {
  border: 1px solid rgba(162, 182, 214, .74);
  border-radius: 16px;
  overflow: hidden;
}

#dashApprovalModal {
  z-index: 2106;
}

body.dash-approval-modal-open .modal-backdrop.show {
  z-index: 2101;
}

#dashWeekBreakdownModal {
  z-index: 2106;
}

body.dash-week-breakdown-modal-open .modal-backdrop.show {
  z-index: 2101;
}

#miniDashWeekBreakdownModal {
  z-index: 2106;
}

body.mini-dash-breakdown-modal-open .modal-backdrop.show {
  z-index: 2101;
}

.dash-approval-modal-meta {
  font-size: .82rem;
  font-weight: 700;
  color: #355180;
}

.dash-approval-modal-plan {
  margin: 10px 0 14px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(162, 184, 214, .6);
  background: rgba(242, 247, 255, .78);
  color: #486389;
}

.dash-week-breakdown-modal-content {
  border-radius: 20px;
  overflow: hidden;
}

.dash-week-breakdown-meta {
  margin-top: 4px;
  font-size: .82rem;
  font-weight: 700;
  color: #5d769d;
}

.dash-week-breakdown-wrap {
  border: 1px solid rgba(170, 190, 219, .78);
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(252, 254, 255, .98), rgba(244, 249, 255, .96));
}

.dash-week-breakdown-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.dash-week-breakdown-note {
  font-size: .85rem;
  color: #5f7499;
  font-weight: 600;
}

@media (max-width: 575.98px) {
  .dash-liquid-status {
    flex-direction: column;
    align-items: flex-start;
  }

  .dash-liquid-countdown {
    width: 100%;
    text-align: center;
  }
}

.dash-charts-row .dash-chart-card .card-body {
  height: 250px;
  padding: 10px 12px 12px;
}

.dash-charts-row .dash-chart-card canvas {
  width: 100% !important;
  height: 100% !important;
}

.dash-list-stack {
  display: grid;
  gap: 8px;
}

.dash-pending-card .dash-list-stack {
  max-height: clamp(260px, 34vh, 356px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

.dash-list-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, .92);
}

.dash-list-item.can-execute {
  cursor: pointer;
}

.dash-list-item.can-execute:hover {
  border-color: rgba(79, 116, 180, .66);
  box-shadow: 0 7px 13px rgba(38, 70, 122, .12);
}

.dash-list-item.compact {
  padding: 7px 9px;
}

.dash-list-item .dash-list-time {
  font-size: .72rem;
  color: #62789f;
  font-weight: 700;
}

.dash-list-item .dash-list-title {
  font-weight: 700;
  color: #203350;
}

.dash-list-item .dash-list-meta {
  font-size: .75rem;
  color: #62789f;
}

.dash-list-item.is-planned {
  border-left: 4px solid #3f72d8;
}

.dash-list-item.is-executed {
  border-left: 4px solid #16a56b;
}

.dash-list-item.is-relegada {
  border-left: 4px solid #ce5f30;
}

.dash-finance-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px dashed rgba(120, 143, 181, .36);
}

.dash-finance-line:last-child {
  border-bottom: 0;
}

.dash-finance-line span {
  font-size: .82rem;
  color: #667ea5;
}

.dash-finance-line strong {
  font-size: 1rem;
  color: #1d3254;
}

.dash-analytics-card .card-body {
  padding-top: 10px;
  padding-bottom: 10px;
}

.dash-analytics-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(133, 157, 196, .34);
  background: linear-gradient(160deg, rgba(255, 255, 255, .96), rgba(244, 248, 255, .9));
  transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
}

.dash-analytics-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -50% auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(var(--dash-accent-rgb, 84, 119, 188), .12) 0%, rgba(var(--dash-accent-rgb, 84, 119, 188), 0) 72%);
  pointer-events: none;
}

.dash-analytics-card:hover {
  transform: translateY(-1px);
  border-color: rgba(103, 131, 177, .52);
  box-shadow: 0 12px 24px rgba(19, 40, 75, .12);
}

.dash-analytics-card.analytics-client {
  --dash-accent-rgb: 74, 116, 199;
}

.dash-analytics-card.analytics-week {
  --dash-accent-rgb: 66, 92, 144;
}

.dash-analytics-card.analytics-advisor {
  --dash-accent-rgb: 31, 136, 116;
}

.dash-analytics-card.analytics-rubro {
  --dash-accent-rgb: 120, 94, 180;
}

.dash-analytics-card.analytics-client .card-header {
  background: linear-gradient(180deg, rgba(74, 116, 199, .17), rgba(74, 116, 199, .06));
  border-bottom-color: rgba(86, 124, 191, .42);
}

.dash-analytics-card.analytics-week .card-header {
  background: linear-gradient(180deg, rgba(66, 92, 144, .16), rgba(66, 92, 144, .06));
  border-bottom-color: rgba(90, 117, 168, .4);
}

.dash-analytics-card.analytics-advisor .card-header {
  background: linear-gradient(180deg, rgba(31, 136, 116, .16), rgba(31, 136, 116, .06));
  border-bottom-color: rgba(53, 144, 127, .4);
}

.dash-analytics-card.analytics-rubro .card-header {
  background: linear-gradient(180deg, rgba(120, 94, 180, .15), rgba(120, 94, 180, .06));
  border-bottom-color: rgba(126, 101, 188, .4);
}

.dash-distribution-list {
  display: grid;
  gap: 9px;
}

.dash-dist-item {
  border: 1px solid rgba(123, 147, 188, .38);
  background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(245, 249, 255, .94));
  border-radius: 10px;
  padding: 7px 9px;
}

.dash-dist-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.dash-dist-label {
  font-size: .79rem;
  color: #304b76;
  font-weight: 700;
  line-height: 1.25;
}

.dash-dist-value {
  font-size: .78rem;
  color: #142b52;
  font-weight: 800;
  white-space: nowrap;
}

.dash-dist-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(95, 128, 185, .18);
  overflow: hidden;
}

.dash-dist-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2f62ff 0%, #3d88d9 100%);
}

.cloud-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel-bg);
  box-shadow: 0 6px 20px rgba(31, 64, 130, .06);
}

.cloud-card .card-header {
  background: var(--card-header-bg);
  border-bottom: 1px solid #b8c9e6;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
  padding: 10px 12px;
}

.cloud-card .card-body {
  padding: 12px;
}

html:not(.theme-dark) .dashboard-home-page .cloud-card .card-header {
  background: linear-gradient(180deg, #d5e2f6 0%, #c2d3ee 100%);
  border-bottom: 1px solid #aebfdf;
}

.plan-header {
  gap: 10px;
  flex-wrap: wrap;
}

.plan-header-title {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.plan-header-actions {
  margin-left: 0;
  width: 100%;
  justify-content: flex-start;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.plan-header-actions .btn {
  white-space: nowrap;
  flex: 0 0 auto;
}

.plan-header-actions::-webkit-scrollbar {
  display: none;
}

.planning-unified-page {
  --planning-paper: rgba(255, 255, 255, 0.76);
  --planning-paper-strong: rgba(255, 255, 255, 0.92);
  --planning-shell-border: rgba(148, 163, 184, 0.24);
  --planning-line: rgba(148, 163, 184, 0.18);
  --planning-title: #0f172a;
  --planning-muted: #64748b;
  --planning-shadow: 0 24px 54px -34px rgba(15, 23, 42, 0.28);
  --planning-shadow-soft: 0 14px 30px -24px rgba(15, 23, 42, 0.24);
  position: relative;
  display: block;
  padding-top: 2px;
}

html.theme-dark .planning-unified-page {
  --planning-paper: rgba(7, 14, 27, 0.78);
  --planning-paper-strong: rgba(10, 19, 35, 0.92);
  --planning-shell-border: rgba(87, 111, 146, 0.34);
  --planning-line: rgba(87, 111, 146, 0.26);
  --planning-title: #e7eefc;
  --planning-muted: #9cb0d0;
  --planning-shadow: 0 26px 56px -36px rgba(2, 6, 23, 0.74);
  --planning-shadow-soft: 0 14px 28px -24px rgba(2, 6, 23, 0.82);
}

.planning-unified-page::before,
.planning-unified-page::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.planning-unified-page::before {
  inset: -20px 0 auto 0;
  height: 460px;
  background:
    radial-gradient(circle at 0% 10%, rgba(59, 130, 246, 0.08) 0%, transparent 46%),
    radial-gradient(circle at 60% 0%, rgba(30, 64, 175, 0.06) 0%, transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.48) 0%, rgba(255, 255, 255, 0) 100%);
}

.planning-unified-page::after {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.4) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.28) 0%, transparent 56%);
}

html.theme-dark .planning-unified-page::before {
  background:
    radial-gradient(circle at 0% 12%, rgba(62, 146, 255, 0.09) 0%, transparent 44%),
    radial-gradient(circle at 68% 0%, rgba(88, 112, 190, 0.08) 0%, transparent 34%),
    linear-gradient(180deg, rgba(11, 18, 31, 0.45) 0%, rgba(11, 18, 31, 0) 100%);
}

html.theme-dark .planning-unified-page::after {
  opacity: 0.08;
}

.planning-unified-grid {
  position: relative;
  z-index: 1;
  align-items: flex-start;
}

.planning-col-left,
.planning-col-center,
.planning-col-right {
  min-width: 0;
}

#exec-inline-engine {
  display: none !important;
}

.planning-unified-sidebar {
  min-width: 0;
}

.planning-unified-page .planning-entry-card,
.planning-unified-page .planning-inline-exec-card,
.planning-unified-page .planning-agenda-card {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--planning-shell-border);
  background: var(--planning-paper);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: var(--planning-shadow);
}

.planning-unified-page .planning-agenda-card {
  overflow: visible;
}

.planning-unified-page .planning-mini-dashboard {
  position: relative;
  z-index: 1;
  border-radius: 22px;
  border: 1px solid var(--planning-shell-border);
  background: var(--planning-paper);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: var(--planning-shadow);
  overflow: visible;
  isolation: isolate;
}

.planning-unified-page .planning-mini-dashboard.is-week-panel-open {
  z-index: 80;
}

.planning-unified-page .planning-mini-dashboard .card-header {
  padding: 14px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(243, 247, 252, 0.76) 100%);
  border-bottom: 1px solid var(--planning-shell-border);
  overflow: visible;
}

.planning-unified-page .planning-mini-dashboard .card-body {
  padding: 14px 18px 18px;
}

.planning-unified-page.is-admin-home .planning-admin-summary-card .card-header {
  align-items: center;
}

.planning-admin-summary-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 0;
  text-align: right;
}

.planning-admin-summary-week {
  font-size: .92rem;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--planning-title);
}

.planning-admin-summary-filter {
  font-size: .74rem;
  color: var(--planning-muted);
}

.planning-admin-home-layout {
  align-items: flex-start;
}

.planning-admin-home-sidebar {
  height: 100%;
}

.planning-admin-mini-calendar-shell {
  margin-bottom: 0;
}

.planning-admin-mini-calendar-card {
  height: 100%;
}

.planning-admin-mini-calendar-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--planning-shell-border);
}

.planning-admin-mini-calendar-week {
  font-size: .92rem;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--planning-title);
}

.planning-admin-mini-calendar-filter {
  font-size: .76rem;
  color: var(--planning-muted);
}

.planning-admin-mini-calendar-note {
  font-size: .72rem;
  line-height: 1.45;
  color: var(--planning-muted);
}

.planning-unified-page.is-admin-home .planning-admin-summary-card .card-body {
  padding-top: 16px;
}

.planning-admin-insights-row {
  margin-top: .15rem;
}

/* Schedule activity modal section titles */
@keyframes sst-pop {
  0%   { transform: scale(.55) rotate(-8deg); opacity: 0; }
  65%  { transform: scale(1.12) rotate(3deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes sst-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--sst-glow); }
  50%       { box-shadow: 0 0 0 6px transparent; }
}
.schedule-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 14px;
  position: relative;
}
.schedule-section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  border-radius: 2px;
  background: var(--sst-line, linear-gradient(90deg, rgba(58,108,219,.35) 0%, transparent 100%));
  margin-left: 4px;
}
.schedule-section-title .sst-icon {
  --sst-glow: rgba(58,108,219,.4);
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--sst-bg, linear-gradient(135deg, #3a6cdb 0%, #5b8ef0 100%));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .8rem;
  box-shadow: 0 4px 12px var(--sst-glow);
  animation: sst-pop .38s cubic-bezier(.34,1.56,.64,1) both,
             sst-pulse 3s ease-in-out 1s infinite;
}
.schedule-section-title .sst-label {
  font-size: .73rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sst-text, #2f4e90);
}
/* Per-section color themes */
.schedule-section-title.sst-blue   { --sst-bg: linear-gradient(135deg,#2563eb,#60a5fa); --sst-glow: rgba(37,99,235,.38); --sst-text:#1e40af; --sst-line: linear-gradient(90deg,rgba(37,99,235,.3) 0%,transparent 100%); }
.schedule-section-title.sst-amber  { --sst-bg: linear-gradient(135deg,#d97706,#fbbf24); --sst-glow: rgba(217,119,6,.38);  --sst-text:#92400e; --sst-line: linear-gradient(90deg,rgba(217,119,6,.3) 0%,transparent 100%); }
.schedule-section-title.sst-green  { --sst-bg: linear-gradient(135deg,#059669,#34d399); --sst-glow: rgba(5,150,105,.38);  --sst-text:#065f46; --sst-line: linear-gradient(90deg,rgba(5,150,105,.3) 0%,transparent 100%); }
.schedule-section-title.sst-purple { --sst-bg: linear-gradient(135deg,#7c3aed,#a78bfa); --sst-glow: rgba(124,58,237,.38); --sst-text:#4c1d95; --sst-line: linear-gradient(90deg,rgba(124,58,237,.3) 0%,transparent 100%); }
html.theme-dark .schedule-section-title.sst-blue   { --sst-text: #93c5fd; }
html.theme-dark .schedule-section-title.sst-amber  { --sst-text: #fcd34d; }
html.theme-dark .schedule-section-title.sst-green  { --sst-text: #6ee7b7; }
html.theme-dark .schedule-section-title.sst-purple { --sst-text: #c4b5fd; }

/* Admin home tabs (Inicio / Analíticas) */
.admin-home-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid rgba(255,255,255,.12);
  padding: 0 4px;
  margin: 8px 0 0;
}
.admin-home-tabs .nav-link {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  padding: 10px 18px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  cursor: pointer;
  transition: color .18s, border-color .18s;
  margin-bottom: -2px;
}
.admin-home-tabs .nav-link:hover {
  color: rgba(255,255,255,.85);
}
.admin-home-tabs .nav-link.active {
  color: #fff;
  border-bottom-color: #4f78be;
}
html:not(.theme-dark) .admin-home-tabs {
  border-bottom-color: rgba(0,0,0,.12);
}
html:not(.theme-dark) .admin-home-tabs .nav-link {
  color: rgba(30,40,70,.45);
}
html:not(.theme-dark) .admin-home-tabs .nav-link:hover {
  color: rgba(30,40,70,.85);
}
html:not(.theme-dark) .admin-home-tabs .nav-link.active {
  color: #2f4e90;
  border-bottom-color: #2f4e90;
}
.admin-home-tab-content {
  padding-top: 0;
}
@media (max-width: 575px) {
  .admin-home-tabs .nav-link {
    padding: 8px 12px;
    font-size: .75rem;
  }
}

html.theme-dark .planning-unified-page .planning-mini-dashboard .card-header {
  background:
    linear-gradient(180deg, rgba(17, 25, 40, 0.96) 0%, rgba(10, 18, 33, 0.9) 100%);
}

html.theme-dark .planning-admin-summary-week {
  color: #f8fbff;
}

html.theme-dark .planning-admin-summary-filter {
  color: rgba(196, 210, 236, 0.78);
}

html.theme-dark .planning-admin-mini-calendar-filter,
html.theme-dark .planning-admin-mini-calendar-note {
  color: rgba(196, 210, 236, 0.78);
}

@media (min-width: 992px) {
  .planning-admin-home-sidebar {
    position: sticky;
    top: 86px;
  }
}

.planning-mini-dashboard-title h6 {
  color: var(--planning-title);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.02em;
}

.planning-mini-dashboard-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
  position: relative;
  z-index: 6;
}

.planning-mini-week-control {
  position: relative;
  display: flex;
  align-items: center;
  z-index: 8;
}

.planning-mini-week-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  min-width: 280px;
  padding: 9px 14px;
  border-radius: 16px;
  border: 1px solid var(--planning-shell-border);
  background: rgba(255, 255, 255, 0.72);
  color: var(--planning-title);
  text-align: left;
  box-shadow: 0 10px 24px rgba(29, 50, 83, .08);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.planning-mini-week-toggle:hover,
.planning-mini-week-toggle:focus-visible {
  border-color: rgba(59, 130, 246, 0.28);
  box-shadow: 0 14px 28px rgba(29, 50, 83, .12);
  transform: translateY(-1px);
}

.planning-mini-week-control.is-open .planning-mini-week-toggle {
  border-color: rgba(59, 130, 246, 0.34);
  box-shadow: 0 16px 30px rgba(29, 50, 83, .14);
}

.planning-mini-week-control.is-open .planning-mini-week-toggle>i {
  transform: rotate(180deg);
}

html.theme-dark .planning-mini-week-toggle {
  background: rgba(11, 20, 35, 0.82);
  color: #edf4ff;
}

.planning-mini-week-toggle-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.planning-mini-week-toggle-label {
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--planning-muted);
}

.planning-mini-week-toggle-value {
  font-size: .83rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--planning-title);
}

html.theme-dark .planning-mini-week-toggle-value {
  color: #f8fbff;
}

.planning-mini-week-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 1200;
  width: min(320px, calc(100vw - 36px));
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--planning-shell-border);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 22px 44px rgba(30, 41, 59, .16);
}

.planning-mini-week-panel.is-portal {
  position: fixed;
}

.planning-mini-week-toggle>i {
  transition: transform .18s ease;
}

html.theme-dark .planning-mini-week-panel {
  background: rgba(11, 20, 35, 0.95);
  box-shadow: 0 24px 50px rgba(0, 0, 0, .36);
}

.planning-mini-week-panel-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.planning-mini-week-panel-title {
  min-width: 0;
  text-align: center;
}

.planning-mini-week-panel-label {
  display: block;
  margin-bottom: 2px;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--planning-muted);
}

.planning-mini-week-panel-range {
  display: block;
  font-size: .84rem;
  font-weight: 700;
  color: var(--planning-title);
}

.planning-mini-week-panel-input-label {
  display: block;
  margin-bottom: 6px;
  font-size: .69rem;
  font-weight: 600;
  color: var(--planning-muted);
}

.planning-mini-week-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow: auto;
  padding-right: 2px;
}

.planning-mini-week-option {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(255, 255, 255, 0.72);
  color: var(--planning-title);
  text-align: left;
  transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.planning-mini-week-option:hover,
.planning-mini-week-option:focus-visible {
  border-color: rgba(59, 130, 246, 0.28);
  background: rgba(241, 245, 249, 0.96);
  transform: translateY(-1px);
}

.planning-mini-week-option.is-active {
  border-color: rgba(59, 130, 246, 0.34);
  background: rgba(59, 130, 246, 0.12);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.08);
}

.planning-mini-week-option-main {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: -.01em;
}

.planning-mini-week-option-sub {
  font-size: .72rem;
  color: var(--planning-muted);
}

html.theme-dark .planning-mini-week-option {
  background: rgba(17, 27, 46, 0.88);
  border-color: rgba(87, 111, 146, 0.34);
  color: #edf4ff;
}

html.theme-dark .planning-mini-week-option:hover,
html.theme-dark .planning-mini-week-option:focus-visible {
  background: rgba(22, 35, 58, 0.96);
}

html.theme-dark .planning-mini-week-option.is-active {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(96, 165, 250, 0.44);
}

.planning-mini-week-panel-note {
  margin-top: 8px;
  font-size: .72rem;
  color: var(--planning-muted);
}

.planning-mini-stats-row {
  align-items: stretch;
}

.planning-mini-dashboard .planning-mini-stat {
  min-height: 86px;
  padding: 12px 14px;
  border-radius: 14px;
  box-shadow: 0 10px 18px rgba(29, 50, 83, .12);
}

.planning-mini-dashboard .planning-mini-stat.is-clickable {
  transition: transform .2s ease, box-shadow .22s ease, border-color .22s ease;
}

.planning-mini-dashboard-stats {
  width: 100%;
}

.planning-mini-context-row {
  display: none;
  margin-top: .7rem;
}

.planning-mini-dashboard-stats.is-compact-context .planning-mini-context-row {
  display: flex;
}

.planning-mini-context-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 72px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(191, 219, 254, 0.65);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(241, 245, 249, 0.92) 100%);
  box-shadow: 0 10px 18px rgba(29, 50, 83, .08);
}

.planning-mini-context-copy {
  min-width: 0;
}

.planning-mini-context-label {
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--planning-muted);
}

.planning-mini-context-value {
  margin-top: 2px;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--planning-ink);
}

.planning-mini-context-meta {
  margin-top: 2px;
  font-size: .75rem;
  color: rgba(71, 85, 105, 0.92);
}

.planning-mini-context-icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.58);
  color: #3b82f6;
}

.planning-mini-context-countdown.is-open .planning-mini-context-value {
  color: #1d4ed8;
}

.planning-mini-context-countdown.is-urgent .planning-mini-context-value {
  color: #b45309;
  animation: shepard-pulse-warn 1.4s ease-in-out infinite;
}

@keyframes shepard-pulse-warn {
  0%, 100% { opacity: 1; }
  50%       { opacity: .55; }
}

.planning-mini-context-countdown.is-overdue .planning-mini-context-value {
  color: #b91c1c;
}

.planning-mini-context-countdown.is-closed .planning-mini-context-value {
  color: #92400e;
}

.planning-mini-context-balance.is-positive .planning-mini-context-value {
  color: #9a3412;
}

.planning-mini-context-balance.is-negative .planning-mini-context-value {
  color: #b91c1c;
}

.planning-mini-context-balance.is-neutral .planning-mini-context-value {
  color: #475569;
}

.planning-mini-dashboard .planning-mini-stat .dash-stat-icon {
  width: 28px;
  height: 28px;
  top: 10px;
  right: 10px;
}

.planning-mini-dashboard .planning-mini-stat .dash-stat-label {
  font-size: .67rem;
  letter-spacing: .08em;
}

.planning-mini-dashboard .planning-mini-stat .dash-stat-value {
  margin-top: 3px;
  font-size: 1.28rem;
}

.planning-mini-dashboard .planning-mini-stat .dash-stat-meta {
  font-size: .74rem;
}

/* Fallback for Safari repaint glitches: keep stat cards colored reliably.
   translateZ(0) forces GPU compositing; background-color is the solid fallback
   when Safari drops the gradient on DOM-triggered repaints (is-loading toggle,
   day-tracker re-render, etc.). Applied to both admin and non-admin cards. */
.planning-unified-page.is-admin-home #dashStatsCards .dash-stat-card,
#miniDashStatsCards .dash-stat-card {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.planning-unified-page.is-admin-home #dashStatsCards .dash-stat-card.stat-plan,
#miniDashStatsCards .dash-stat-card.stat-plan {
  background-color: #2563eb;
  background-image: linear-gradient(142deg, #1a3a6c 0%, #2563eb 52%, #3b7af2 100%);
}

.planning-unified-page.is-admin-home #dashStatsCards .dash-stat-card.stat-transfer,
#miniDashStatsCards .dash-stat-card.stat-transfer {
  background-color: #0369a1;
  background-image: linear-gradient(142deg, #0c4a6e 0%, #0369a1 54%, #0891b2 100%);
}

.planning-unified-page.is-admin-home #dashStatsCards .dash-stat-card.stat-executed,
#miniDashStatsCards .dash-stat-card.stat-executed {
  background-color: #c05621;
  background-image: linear-gradient(142deg, #7c2d12 0%, #c05621 54%, #ea7a3e 100%);
}

.planning-unified-page.is-admin-home #dashStatsCards .dash-stat-card.stat-approved,
#miniDashStatsCards .dash-stat-card.stat-approved {
  background-color: #16a34a;
  background-image: linear-gradient(142deg, #14532d 0%, #16a34a 54%, #22c55e 100%);
}

html.theme-dark .planning-unified-page.is-admin-home #dashStatsCards .dash-stat-card.stat-plan,
html.theme-dark #miniDashStatsCards .dash-stat-card.stat-plan {
  background-color: #1d4ed8;
  background-image: linear-gradient(150deg, rgba(26, 58, 108, .95), rgba(29, 78, 216, .92));
}

html.theme-dark .planning-unified-page.is-admin-home #dashStatsCards .dash-stat-card.stat-transfer,
html.theme-dark #miniDashStatsCards .dash-stat-card.stat-transfer {
  background-color: #0369a1;
  background-image: linear-gradient(150deg, rgba(7, 52, 90, .96), rgba(3, 105, 161, .92));
}

html.theme-dark .planning-unified-page.is-admin-home #dashStatsCards .dash-stat-card.stat-executed,
html.theme-dark #miniDashStatsCards .dash-stat-card.stat-executed {
  background-color: #b45309;
  background-image: linear-gradient(150deg, rgba(100, 38, 8, .96), rgba(180, 83, 9, .92));
}

html.theme-dark .planning-unified-page.is-admin-home #dashStatsCards .dash-stat-card.stat-approved,
html.theme-dark #miniDashStatsCards .dash-stat-card.stat-approved {
  background-color: #15803d;
  background-image: linear-gradient(150deg, rgba(20, 83, 45, .96), rgba(21, 128, 61, .92));
}

@media (hover: hover) and (pointer: fine) {
  .planning-mini-dashboard .planning-mini-stat.is-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 30px rgba(27, 52, 92, .22);
    border-color: rgba(255, 255, 255, .52);
  }
}

.planning-mini-dashboard.is-loading .planning-mini-stat {
  opacity: .72;
  transition: opacity .18s ease;
}

.planning-mini-dashboard.is-loading .planning-mini-context-card {
  opacity: .72;
}

html.theme-dark .planning-mini-context-card {
  border-color: rgba(72, 98, 141, 0.44);
  background:
    linear-gradient(180deg, rgba(13, 22, 39, 0.95) 0%, rgba(9, 17, 31, 0.9) 100%);
  box-shadow: 0 10px 18px rgba(2, 6, 23, .22);
}

html.theme-dark .planning-mini-context-label {
  color: rgba(169, 188, 218, 0.82);
}

html.theme-dark .planning-mini-context-value {
  color: #eff6ff;
}

html.theme-dark .planning-mini-context-meta {
  color: rgba(196, 210, 236, 0.78);
}

html.theme-dark .planning-mini-context-icon {
  border-color: rgba(96, 124, 173, 0.36);
  background: rgba(18, 31, 57, 0.82);
  color: #93c5fd;
}

html.theme-dark .planning-mini-context-countdown.is-open .planning-mini-context-value {
  color: #93c5fd;
}

html.theme-dark .planning-mini-context-countdown.is-overdue .planning-mini-context-value {
  color: #fca5a5;
}

html.theme-dark .planning-mini-context-countdown.is-closed .planning-mini-context-value {
  color: #fcd34d;
}

html.theme-dark .planning-mini-context-balance.is-positive .planning-mini-context-value {
  color: #fdba74;
}

html.theme-dark .planning-mini-context-balance.is-negative .planning-mini-context-value {
  color: #fca5a5;
}

html.theme-dark .planning-mini-context-balance.is-neutral .planning-mini-context-value {
  color: #cbd5e1;
}

/* ── Mini-dash Day Tracker — UIverse meeting-card style ─────
   .mini-dash-day-tracker  →  .mdt-row  →  .mdt-bubble
   .mdt-row  →  .mdt-bubble (.mdt-bubble-num + .mdt-bubble-name)
   .mdt-indicators  →  .mdt-dot + .mdt-indicator-line
────────────────────────────────────────────────────────── */
.mini-dash-day-tracker {
  margin: .75rem 0 .25rem;
}

/* Day strip container */
.mdt-row {
  background-color: #fff;
  border-radius: 16px;
  padding: 10px 6px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  box-shadow: 0 1px 6px rgba(30,50,100,.07);
}

/* Each day column */
.mdt-bubble {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
  cursor: default;
  user-select: none;
}

/* Day number (top pill half) + Day name (bottom pill half) */
.mdt-bubble-num,
.mdt-bubble-name {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 36px;
  background-color: transparent;
  transition: background-color .2s ease;
}
.mdt-bubble-num {
  font-size: 1.1rem;
  font-weight: 700;
  height: 28px;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  padding-top: 4px;
  color: #1e2a3a;
  line-height: 1;
}
.mdt-bubble-name {
  font-size: .62rem;
  font-weight: 700;
  height: 20px;
  color: #666;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .03em;
}

/* Hover */
.mdt-bubble:hover .mdt-bubble-num,
.mdt-bubble:hover .mdt-bubble-name {
  background-color: #f3f5f8;
}

/* ── State colors ────────────────────── */
/* No activities */
.mdt-bubble--noplan {
  opacity: .42;
}

/* Today (active) — UIverse yellow */
.mdt-bubble--today .mdt-bubble-num,
.mdt-bubble--today .mdt-bubble-name {
  background-color: #f0ff7a;
  color: #1a2000;
}
.mdt-bubble--today .mdt-bubble-num { font-weight: 800; }

/* All executed */
.mdt-bubble--done .mdt-bubble-num,
.mdt-bubble--done .mdt-bubble-name {
  background-color: #bbf7d0;
  color: #14532d;
}

/* Overdue — has pending activities from past */
.mdt-bubble--overdue .mdt-bubble-num,
.mdt-bubble--overdue .mdt-bubble-name {
  background-color: #fecaca;
  color: #7f1d1d;
}

/* Partial — some executed, some not */
.mdt-bubble--partial .mdt-bubble-num,
.mdt-bubble--partial .mdt-bubble-name {
  background-color: #fde68a;
  color: #78350f;
}

/* Future — has activities */
.mdt-bubble--future .mdt-bubble-num,
.mdt-bubble--future .mdt-bubble-name {
  background-color: #e0e7ff;
  color: #3730a3;
}

/* ── Indicator dots row ─────────────── */
.mdt-indicators {
  display: flex;
  justify-content: space-between;
  width: 100%;
  position: relative;
  padding: 0 24px;
  box-sizing: border-box;
  margin-bottom: 2px;
}

.mdt-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #d0d0ce;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}
.mdt-dot--active {
  background-color: #1e2a3a;
}
.mdt-dot--today {
  background-color: #b8cc00;
  box-shadow: 0 0 0 2px rgba(240,255,122,.65);
}
.mdt-dot--done  { background-color: #16a34a; }
.mdt-dot--overdue  { background-color: #dc2626; }
.mdt-dot--partial  { background-color: #d97706; }

.mdt-indicator-line {
  position: absolute;
  top: 50%;
  left: 28px;
  right: 28px;
  height: 0;
  border-top: 1.5px dashed #d0d0ce;
  z-index: 1;
  transform: translateY(-50%);
}

/* ── Dark mode ──────────────────────── */
html.theme-dark .mdt-row {
  background-color: rgba(16,26,46,.85);
  box-shadow: 0 1px 6px rgba(0,0,0,.3);
}
html.theme-dark .mdt-bubble-num { color: #d8e8ff; }
html.theme-dark .mdt-bubble-name { color: #6880a8; }
html.theme-dark .mdt-bubble:hover .mdt-bubble-num,
html.theme-dark .mdt-bubble:hover .mdt-bubble-name {
  background-color: rgba(255,255,255,.07);
}
html.theme-dark .mdt-bubble--today .mdt-bubble-num,
html.theme-dark .mdt-bubble--today .mdt-bubble-name {
  background-color: #cfe826;
  color: #0d1800;
}
html.theme-dark .mdt-bubble--done .mdt-bubble-num,
html.theme-dark .mdt-bubble--done .mdt-bubble-name {
  background-color: rgba(34,197,94,.2);
  color: #4ade80;
}
html.theme-dark .mdt-bubble--overdue .mdt-bubble-num,
html.theme-dark .mdt-bubble--overdue .mdt-bubble-name {
  background-color: rgba(239,68,68,.2);
  color: #fca5a5;
}
html.theme-dark .mdt-bubble--partial .mdt-bubble-num,
html.theme-dark .mdt-bubble--partial .mdt-bubble-name {
  background-color: rgba(245,158,11,.2);
  color: #fcd34d;
}
html.theme-dark .mdt-bubble--future .mdt-bubble-num,
html.theme-dark .mdt-bubble--future .mdt-bubble-name {
  background-color: rgba(99,102,241,.22);
  color: #a5b4fc;
}
html.theme-dark .mdt-dot { background-color: #2e3e5c; }
html.theme-dark .mdt-dot--active { background-color: #d8e8ff; }
html.theme-dark .mdt-dot--today { background-color: #a8c000; }
html.theme-dark .mdt-dot--done { background-color: #22c55e; }
html.theme-dark .mdt-dot--overdue { background-color: #ef4444; }
html.theme-dark .mdt-dot--partial { background-color: #f59e0b; }
html.theme-dark .mdt-indicator-line { border-top-color: #2e3e5c; }

/* ── CTA button ─────────────────────────────────────────── */
.mini-dash-exec-cta {
  display: flex;
  align-items: center;
  gap: .65rem;
  width: 100%;
  background: var(--bs-primary, #4f46e5);
  color: #fff;
  border-radius: 10px;
  padding: .65rem 1rem;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  margin-top: .6rem;
  transition: background .13s, transform .12s, box-shadow .12s;
  box-shadow: 0 2px 10px rgba(79,70,229,.28);
}
.mini-dash-exec-cta:hover {
  background: #4338ca;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(79,70,229,.38);
}
.mini-dash-exec-cta-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}
.mini-dash-exec-cta-arrow {
  margin-left: auto;
  opacity: .7;
  font-size: .85rem;
}

html.theme-dark .mini-dash-exec-cta {
  background: #4f46e5;
  box-shadow: 0 2px 12px rgba(79,70,229,.45);
}
html.theme-dark .mini-dash-exec-cta:hover {
  background: #4338ca;
}

@media (hover: hover) and (pointer: fine) {
  html.theme-dark .planning-mini-dashboard .planning-mini-stat.is-clickable:hover {
    box-shadow: 0 18px 30px rgba(2, 8, 24, .38);
    border-color: rgba(148, 185, 255, .46);
  }
}

.planning-unified-page .planning-entry-card .card-header,
.planning-unified-page .planning-inline-exec-card .card-header,
.planning-unified-page .planning-agenda-card .card-header {
  padding: 18px 20px 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(243, 247, 252, 0.78) 100%);
  border-bottom: 1px solid var(--planning-shell-border);
}

/* Week toggle inside the agenda card header — compact width */
.planning-agenda-card .planning-mini-week-toggle {
  min-width: 220px;
  min-height: 38px;
  padding: 7px 12px;
}

html.theme-dark .planning-unified-page .planning-entry-card .card-header,
html.theme-dark .planning-unified-page .planning-inline-exec-card .card-header,
html.theme-dark .planning-unified-page .planning-agenda-card .card-header {
  background:
    linear-gradient(180deg, rgba(17, 25, 40, 0.96) 0%, rgba(10, 18, 33, 0.9) 100%);
}

.planning-entry-card-body,
.planning-inline-exec-body,
.planning-agenda-body {
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.46) 0%, rgba(248, 250, 252, 0.7) 100%);
}

.planning-unified-page .planning-agenda-collapse-toggle {
  min-width: 36px;
  width: 36px;
  padding-left: 0;
  padding-right: 0;
}

.planning-unified-page .planning-agenda-collapse-toggle i {
  transition: transform .18s ease;
}

.planning-unified-page .planning-agenda-card.is-collapsed .planning-agenda-body {
  display: none;
}

html.theme-dark .planning-entry-card-body,
html.theme-dark .planning-inline-exec-body,
html.theme-dark .planning-agenda-body {
  background:
    linear-gradient(180deg, rgba(10, 18, 33, 0.54) 0%, rgba(6, 11, 22, 0.78) 100%);
}

.planning-mini-calendar-shell {
  margin-bottom: 14px;
}

.planning-mini-calendar-card {
  border: 1px solid var(--planning-shell-border);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(246, 249, 253, 0.88) 100%);
  box-shadow: var(--planning-shadow-soft);
  padding: 0;       /* handled by pmcal-main */
  overflow: hidden;
}

/* ── UIverse-style mini calendar two-panel layout ──────────── */
.pmcal-layout {
  display: flex;
  min-height: 0;
}

/* Compact green left panel */
.pmcal-green-panel {
  flex: 0 0 72px;
  background: linear-gradient(160deg, #27ae60 0%, #1a8a48 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 14px 6px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.pmcal-green-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 25% 25%, rgba(255,255,255,.12) 0%, transparent 65%);
  pointer-events: none;
}
.pmcal-gp-num {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: .85;
  color: #fff;
  letter-spacing: -.04em;
  text-shadow: 0 1px 5px rgba(0,0,0,.18);
}
.pmcal-gp-day {
  font-size: .62rem;
  font-weight: 800;
  color: rgba(255,255,255,.9);
  text-transform: uppercase;
  letter-spacing: .07em;
  line-height: 1;
}
.pmcal-gp-month {
  font-size: .6rem;
  color: rgba(255,255,255,.65);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-top: 2px;
}

/* Right panel: existing content */
.pmcal-main {
  flex: 1 1 0;
  min-width: 0;
  padding: 14px;
}

/* Today cell in mini calendar — green circle on number */
.planning-mini-calendar-day.is-today .planning-mini-calendar-day-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2eca71;
  color: #fff;
  font-weight: 800;
  font-size: .72rem;
  box-shadow: 0 1px 6px rgba(39,174,96,.4);
}

/* Dark mode */
html.theme-dark .planning-mini-calendar-card {
  border-color: rgba(76, 98, 131, 0.44);
  background: linear-gradient(180deg, rgba(12, 21, 38, 0.96) 0%, rgba(8, 15, 28, 0.92) 100%);
}
html.theme-dark .pmcal-green-panel {
  background: linear-gradient(160deg, #1e6e3a 0%, #145228 100%);
}
html.theme-dark .planning-mini-calendar-day.is-today .planning-mini-calendar-day-number {
  background: #22a356;
  box-shadow: 0 1px 8px rgba(34,163,86,.45);
}

/* Responsive: hide green panel in very tight spaces */
@media (max-width: 380px) {
  .pmcal-green-panel { display: none; }
}
/* ── END UIverse-style mini calendar ───────────────────────── */

.planning-mini-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.planning-mini-calendar-copy {
  min-width: 0;
}

.planning-mini-calendar-kicker {
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--planning-muted);
  margin-bottom: 4px;
}

.planning-mini-calendar-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--planning-title);
  line-height: 1.1;
}

.planning-mini-calendar-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.planning-mini-calendar-nav-btn {
  min-width: 2rem;
  width: 2rem;
  padding-left: 0;
  padding-right: 0;
}

.planning-mini-calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 6px;
}

.planning-mini-calendar-weekdays span {
  text-align: center;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--planning-muted);
}

.planning-mini-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.planning-mini-calendar-day {
  min-height: 48px;
  border: 1px solid rgba(203, 213, 225, 0.76);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--planning-title);
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  transition: border-color .18s ease, background .18s ease, transform .12s ease, box-shadow .18s ease;
}

.planning-mini-calendar-day:hover,
.planning-mini-calendar-day:focus-visible {
  border-color: rgba(59, 130, 246, 0.42);
  background: rgba(239, 246, 255, 0.94);
  box-shadow: 0 10px 18px rgba(148, 163, 184, 0.16);
  transform: translateY(-1px);
}

.planning-mini-calendar-day.is-outside {
  opacity: .42;
}

.planning-mini-calendar-day.is-selected {
  border-color: rgba(37, 99, 235, 0.52);
  background: rgba(219, 234, 254, 0.9);
}

.planning-mini-calendar-day-number {
  font-size: .82rem;
  font-weight: 700;
  line-height: 1;
}

.planning-mini-calendar-day-count {
  min-width: 1.2rem;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
  font-size: .65rem;
  font-weight: 700;
  line-height: 1.25;
}

.planning-mini-calendar-day-count.is-empty {
  visibility: hidden;
}

.planning-mini-calendar-day.is-executed .planning-mini-calendar-day-count {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}

.planning-mini-calendar-day.is-cancelled .planning-mini-calendar-day-count {
  background: rgba(239, 68, 68, 0.14);
  color: #b91c1c;
}

.planning-mini-calendar-day.is-reprogrammed .planning-mini-calendar-day-count {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
}

.planning-mini-calendar-day.is-relegated .planning-mini-calendar-day-count {
  background: rgba(100, 116, 139, 0.16);
  color: #475569;
}

.planning-mini-calendar-empty {
  grid-column: 1 / -1;
  min-height: 120px;
  border: 1px dashed rgba(148, 163, 184, 0.3);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--planning-muted);
  font-size: .82rem;
}

.planning-mini-calendar-event {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.planning-mini-calendar-event+.planning-mini-calendar-event {
  margin-top: 10px;
}

.planning-mini-calendar-event-time {
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--planning-muted);
  margin-bottom: 4px;
}

.planning-mini-calendar-event-client {
  font-size: .98rem;
  font-weight: 700;
  color: var(--planning-title);
  line-height: 1.2;
}

.planning-mini-calendar-event-equipment {
  margin-top: 2px;
  font-size: .84rem;
  font-weight: 600;
  color: #425977;
  line-height: 1.2;
}

.planning-mini-calendar-event-meta {
  margin-top: 4px;
  font-size: .82rem;
  color: var(--planning-muted);
}

.planning-mini-calendar-event-detail {
  margin-top: 5px;
  font-size: .78rem;
  line-height: 1.3;
  color: #5c6f8b;
}

.planning-mini-calendar-event-side {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.planning-mini-calendar-event-state {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: #475569;
  font-size: .74rem;
  font-weight: 700;
  text-transform: capitalize;
}

.planning-mini-calendar-event-action {
  white-space: nowrap;
}

.planning-mini-calendar-event.is-executed .planning-mini-calendar-event-state {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}

.planning-mini-calendar-event.is-cancelled .planning-mini-calendar-event-state {
  background: rgba(239, 68, 68, 0.14);
  color: #b91c1c;
}

.planning-mini-calendar-event.is-reprogrammed .planning-mini-calendar-event-state {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
}

.planning-mini-calendar-event.is-relegated .planning-mini-calendar-event-state {
  background: rgba(100, 116, 139, 0.16);
  color: #475569;
}

html.theme-dark .planning-mini-calendar-card {
  border-color: rgba(76, 98, 131, 0.44);
  background:
    linear-gradient(180deg, rgba(12, 21, 38, 0.96) 0%, rgba(8, 15, 28, 0.92) 100%);
}

html.theme-dark .planning-mini-calendar-title {
  color: #f8fbff;
}

html.theme-dark .planning-mini-calendar-day {
  border-color: rgba(62, 84, 118, 0.78);
  background: rgba(10, 20, 36, 0.88);
  color: #e5efff;
}

html.theme-dark .planning-mini-calendar-day:hover,
html.theme-dark .planning-mini-calendar-day:focus-visible {
  border-color: rgba(96, 165, 250, 0.48);
  background: rgba(16, 31, 56, 0.92);
  box-shadow: 0 10px 18px rgba(3, 11, 29, 0.32);
}

html.theme-dark .planning-mini-calendar-day.is-selected {
  border-color: rgba(96, 165, 250, 0.56);
  background: rgba(23, 43, 77, 0.92);
}

html.theme-dark .planning-mini-calendar-day-count {
  background: rgba(59, 130, 246, 0.18);
  color: #bfdbfe;
}

html.theme-dark .planning-mini-calendar-day.is-executed .planning-mini-calendar-day-count {
  background: rgba(16, 185, 129, 0.18);
  color: #a7f3d0;
}

html.theme-dark .planning-mini-calendar-day.is-cancelled .planning-mini-calendar-day-count {
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
}

html.theme-dark .planning-mini-calendar-day.is-reprogrammed .planning-mini-calendar-day-count {
  background: rgba(245, 158, 11, 0.2);
  color: #fde68a;
}

html.theme-dark .planning-mini-calendar-day.is-relegated .planning-mini-calendar-day-count {
  background: rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
}

html.theme-dark .planning-mini-calendar-empty {
  border-color: rgba(76, 98, 131, 0.38);
  color: #9fb3d3;
}

html.theme-dark .planning-mini-calendar-event {
  border-color: rgba(62, 84, 118, 0.74);
  background: rgba(10, 20, 36, 0.9);
}

html.theme-dark .planning-mini-calendar-event-client {
  color: #f8fbff;
}

html.theme-dark .planning-mini-calendar-event-equipment {
  color: #c6d7f1;
}

html.theme-dark .planning-mini-calendar-event-meta,
html.theme-dark .planning-mini-calendar-event-time {
  color: #9fb3d3;
}

html.theme-dark .planning-mini-calendar-event-detail {
  color: #afc2e2;
}

.planning-panel-heading,
.planning-history-title {
  min-width: 0;
}

.planning-panel-kicker,
.planning-history-kicker {
  margin-bottom: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--planning-muted);
}

.planning-panel-heading h5,
.planning-panel-heading h6,
.planning-history-title h6 {
  color: var(--planning-title);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -.03em;
}

.planning-history-title h6 {
  font-size: 1.32rem;
}

.planning-history-mode-hint {
  margin-top: 6px;
  max-width: 56ch;
  font-size: .79rem;
  line-height: 1.34;
  color: var(--planning-muted);
}

html.theme-dark .planning-history-mode-hint {
  color: #9fb3d3;
}

.plan-header {
  gap: 14px;
}

.planning-unified-page .plan-header-actions {
  gap: .55rem !important;
}

.planning-unified-page .plan-header-actions .btn,
.planning-unified-page .planning-agenda-card .btn,
.planning-unified-page .planning-inline-exec-card .btn {
  border-radius: 999px;
  min-height: 36px;
  padding-left: .78rem;
  padding-right: .78rem;
  font-weight: 600;
  box-shadow: none;
}

.planning-unified-page .plan-header-actions .plan-quick-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: .48rem;
  min-width: 7.35rem;
  padding-left: .9rem;
  padding-right: 1rem;
  border-width: 1px;
  border-style: solid;
  border-color: rgba(148, 163, 184, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.92) 100%);
  color: #334155;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 8px 16px rgba(148, 163, 184, 0.12);
}

.planning-unified-page .plan-header-actions .plan-quick-action:hover,
.planning-unified-page .plan-header-actions .plan-quick-action:focus-visible {
  border-color: rgba(100, 116, 139, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(241, 245, 249, 0.96) 100%);
  color: #0f172a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 10px 18px rgba(100, 116, 139, 0.16);
}

.planning-unified-page .plan-header-actions .plan-quick-action i {
  width: 1.45rem;
  height: 1.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  text-align: center;
  font-size: .92rem;
}

.planning-unified-page .plan-header-actions .plan-quick-action span {
  font-size: .79rem;
  font-weight: 700;
  letter-spacing: .01em;
}

.planning-unified-page .plan-header-actions .plan-quick-action-icon {
  min-width: 2.5rem;
  width: 2.5rem;
  padding-left: 0;
  padding-right: 0;
}

.planning-unified-page .plan-header-actions .plan-quick-action-icon i {
  width: auto;
  height: auto;
  background: transparent;
  border-radius: 0;
  font-size: 1rem;
}

.planning-unified-page .plan-header-actions .plan-accordion-master {
  padding-left: .82rem;
  padding-right: .9rem;
}

.planning-unified-page .plan-header-actions .plan-quick-action-download {
  border-color: rgba(16, 185, 129, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(236, 253, 245, 0.94) 100%);
  color: #047857;
}

.planning-unified-page .plan-header-actions .plan-quick-action-download i {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.planning-unified-page .plan-header-actions .plan-quick-action-download:hover,
.planning-unified-page .plan-header-actions .plan-quick-action-download:focus-visible {
  border-color: rgba(5, 150, 105, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(220, 252, 231, 0.98) 100%);
  color: #065f46;
}

.planning-unified-page .plan-header-actions .plan-quick-action-upload {
  border-color: rgba(59, 130, 246, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(239, 246, 255, 0.94) 100%);
  color: #1d4ed8;
}

.planning-unified-page .plan-header-actions .plan-quick-action-upload i {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}

.planning-unified-page .plan-header-actions .plan-quick-action-upload:hover,
.planning-unified-page .plan-header-actions .plan-quick-action-upload:focus-visible {
  border-color: rgba(37, 99, 235, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(219, 234, 254, 0.98) 100%);
  color: #1e40af;
}

.planning-unified-page .plan-header-actions .btn-outline-secondary,
.planning-unified-page .planning-agenda-card .btn-outline-secondary,
.planning-unified-page .planning-inline-exec-card .btn-outline-secondary {
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(255, 255, 255, 0.72);
}

html.theme-dark .planning-unified-page .plan-header-actions .btn-outline-secondary,
html.theme-dark .planning-unified-page .planning-agenda-card .btn-outline-secondary,
html.theme-dark .planning-unified-page .planning-inline-exec-card .btn-outline-secondary {
  background: rgba(15, 24, 39, 0.76);
  border-color: rgba(87, 111, 146, 0.42);
  color: #d5e2ff;
}

html.theme-dark .planning-unified-page .plan-header-actions .plan-quick-action {
  border-color: rgba(71, 85, 105, 0.72);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.88) 100%);
  color: #dbe7f8;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 10px 18px rgba(2, 6, 23, 0.3);
}

html.theme-dark .planning-unified-page .plan-header-actions .plan-quick-action:hover,
html.theme-dark .planning-unified-page .plan-header-actions .plan-quick-action:focus-visible {
  border-color: rgba(148, 163, 184, 0.5);
  background:
    linear-gradient(180deg, rgba(19, 31, 52, 0.96) 0%, rgba(17, 29, 48, 0.92) 100%);
  color: #eff6ff;
}

html.theme-dark .planning-unified-page .plan-header-actions .plan-quick-action i {
  background: rgba(148, 163, 184, 0.12);
}

html.theme-dark .planning-unified-page .plan-header-actions .plan-quick-action-icon i {
  background: transparent;
}

html.theme-dark .planning-unified-page .plan-header-actions .plan-quick-action-download {
  border-color: rgba(16, 185, 129, 0.34);
  background:
    linear-gradient(180deg, rgba(7, 33, 27, 0.94) 0%, rgba(9, 41, 31, 0.9) 100%);
  color: #a7f3d0;
}

html.theme-dark .planning-unified-page .plan-header-actions .plan-quick-action-download i {
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
}

html.theme-dark .planning-unified-page .plan-header-actions .plan-quick-action-download:hover,
html.theme-dark .planning-unified-page .plan-header-actions .plan-quick-action-download:focus-visible {
  border-color: rgba(52, 211, 153, 0.44);
  background:
    linear-gradient(180deg, rgba(8, 43, 33, 0.96) 0%, rgba(10, 54, 39, 0.92) 100%);
  color: #d1fae5;
}

html.theme-dark .planning-unified-page .plan-header-actions .plan-quick-action-upload {
  border-color: rgba(59, 130, 246, 0.34);
  background:
    linear-gradient(180deg, rgba(14, 29, 58, 0.96) 0%, rgba(13, 35, 66, 0.9) 100%);
  color: #bfdbfe;
}

html.theme-dark .planning-unified-page .plan-header-actions .plan-quick-action-upload i {
  background: rgba(59, 130, 246, 0.16);
  color: #93c5fd;
}

html.theme-dark .planning-unified-page .plan-header-actions .plan-quick-action-upload:hover,
html.theme-dark .planning-unified-page .plan-header-actions .plan-quick-action-upload:focus-visible {
  border-color: rgba(96, 165, 250, 0.48);
  background:
    linear-gradient(180deg, rgba(18, 36, 72, 0.98) 0%, rgba(16, 41, 77, 0.92) 100%);
  color: #eff6ff;
}

.planning-unified-page #planUserFilterWrap,
.planning-unified-page .planning-history-mode-select,
.planning-unified-page .planning-inline-exec-card .card-header>.d-flex.align-items-center.gap-2 {
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--planning-shell-border);
  background: rgba(255, 255, 255, 0.52);
}

html.theme-dark .planning-unified-page #planUserFilterWrap,
html.theme-dark .planning-unified-page .planning-history-mode-select,
html.theme-dark .planning-unified-page .planning-inline-exec-card .card-header>.d-flex.align-items-center.gap-2 {
  background: rgba(11, 20, 35, 0.78);
}

.planning-unified-page #planUserFilterWrap .form-label,
.planning-unified-page .planning-inline-exec-card .card-header .form-select {
  margin-bottom: 0;
}

.planning-unified-page .planning-history-mode-select {
  display: inline-flex;
  align-items: center;
  gap: .52rem;
}

.planning-unified-page .planning-history-mode-select .form-label {
  margin-bottom: 0;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--planning-muted);
}

.planning-unified-page .planning-history-mode-select .form-select {
  min-width: 156px;
  border-radius: 999px;
  border-color: rgba(127, 182, 255, 0.56);
  background-color: rgba(255, 255, 255, 0.84);
  color: #1f63c6;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: none;
}

.planning-unified-page .planning-history-mode-select .form-select:focus {
  border-color: rgba(37, 99, 235, 0.58);
  box-shadow: 0 0 0 .2rem rgba(30, 100, 220, 0.12);
}

html.theme-dark .planning-unified-page .planning-history-mode-select .form-label {
  color: #aac0e0;
}

html.theme-dark .planning-unified-page .planning-history-mode-select .form-select {
  border-color: rgba(100, 141, 211, 0.86);
  background-color: rgba(15, 30, 56, 0.9);
  color: #deebff;
}

html.theme-dark .planning-unified-page .planning-history-mode-select .form-select:focus {
  border-color: rgba(122, 160, 224, 0.95);
  box-shadow: 0 0 0 .2rem rgba(56, 112, 196, 0.24);
}

.planning-form-stack {
  min-width: 0;
  gap: 14px !important;
}

.planning-unified-page .planning-form-stack .subgrid {
  padding: 16px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, var(--planning-paper-strong) 0%, rgba(247, 249, 252, 0.92) 100%);
  border: 1px solid rgba(203, 213, 225, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    var(--planning-shadow-soft);
}

html.theme-dark .planning-unified-page .planning-form-stack .subgrid {
  background:
    linear-gradient(180deg, rgba(12, 21, 38, 0.94) 0%, rgba(8, 15, 28, 0.88) 100%);
  border-color: rgba(76, 98, 131, 0.44);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    var(--planning-shadow-soft);
}

.planning-unified-page .planning-accordion {
  padding: 0;
  overflow: hidden;
}

.planning-unified-page .planning-accordion-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 16px 16px 12px;
}

.planning-unified-page .planning-accordion-toggle:hover,
.planning-unified-page .planning-accordion-toggle:focus-visible {
  background: rgba(59, 130, 246, 0.04);
}

.planning-unified-page .planning-accordion-toggle .subgrid-title {
  margin-bottom: 0;
  flex: 1 1 auto;
}

.planning-unified-page .planning-accordion-icon {
  flex: 0 0 auto;
  color: var(--planning-muted);
  font-size: .78rem;
  transition: transform .24s ease;
}

.planning-unified-page .planning-accordion:not(.is-open) .planning-accordion-icon {
  transform: rotate(-90deg);
}

.planning-unified-page .planning-accordion-body {
  padding: 0 16px 16px;
}

.planning-unified-page .planning-accordion:not(.is-open) .planning-accordion-body {
  display: none;
}

.planning-unified-page .subgrid-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--planning-muted);
}

.planning-unified-page .planning-route-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.planning-unified-page .planning-route-tools .btn {
  flex: 0 0 auto;
}

.planning-unified-page .subgrid-title::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.18) 0%, transparent 100%);
}

.planning-unified-page .form-label {
  margin-bottom: 6px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--planning-muted);
}

.planning-unified-page .form-control,
.planning-unified-page .form-select {
  min-height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

html.theme-dark .planning-unified-page .form-control,
html.theme-dark .planning-unified-page .form-select {
  background: rgba(5, 12, 24, 0.84);
  border-color: rgba(76, 98, 131, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.planning-unified-page .input-group>.btn {
  border-radius: 12px;
  font-weight: 700;
}

.planning-entry-card #map {
  height: 360px;
  border-radius: 16px;
  border: 1px solid var(--planning-shell-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

#exec-inline-engine #exec-activities-container,
.planning-inline-exec-card #exec-activities-container {
  min-height: 320px;
}

.planning-agenda-card #agenda-container {
  min-height: 680px;
}

.planning-agenda-card.is-compact #agenda-container {
  min-height: 0;
  max-height: none;
}

.planning-agenda-card.is-compact .planning-agenda-body {
  padding-bottom: 14px;
}

.planning-col-right .planning-inline-exec-card {
  overflow: hidden;
}

.planning-unified-page #agenda-container>.table-responsive,
.planning-unified-page #exec-activities-container>.table-responsive,
.planning-unified-page .exec-day-detail .table-responsive {
  border: 1px solid var(--planning-shell-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  overflow: auto;
}

html.theme-dark .planning-unified-page #agenda-container>.table-responsive,
html.theme-dark .planning-unified-page #exec-activities-container>.table-responsive,
html.theme-dark .planning-unified-page .exec-day-detail .table-responsive {
  background: rgba(7, 13, 24, 0.84);
}

.planning-unified-page .exec-day-group {
  margin-bottom: 12px;
  border-radius: 18px;
  border: 1px solid var(--planning-shell-border);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--planning-shadow-soft);
  overflow: hidden;
}

html.theme-dark .planning-unified-page .exec-day-group {
  background: rgba(9, 16, 30, 0.82);
}

.planning-unified-page .exec-day-summary {
  width: 100%;
  border: 0;
  padding: 14px 16px;
  background: transparent;
}

.planning-unified-page .planning-inline-exec-card .exec-day-summary:hover,
.planning-unified-page .planning-inline-exec-card .exec-day-summary:focus-visible {
  background: rgba(59, 130, 246, 0.05);
}

.planning-admin-dashboard {
  margin-top: 1rem;
}

.planning-admin-week-row .planning-admin-week-card {
  height: 100%;
}

.planning-admin-week-row .dash-pending-card .card-body {
  max-height: 360px;
}

@media (min-width: 1400px) {
  .planning-unified-grid>.planning-col-left {
    flex: 0 0 28.5%;
    width: 28.5%;
    max-width: 28.5%;
  }

  .planning-unified-grid>.planning-col-center {
    flex: 0 0 71.5%;
    width: 71.5%;
    max-width: 71.5%;
  }

  .planning-unified-sidebar {
    position: sticky;
    top: 86px;
  }

  .planning-col-left .planning-entry-card .card-header {
    padding: 16px 16px 14px;
  }

  .planning-col-left .planning-entry-card-body {
    padding: 14px;
  }

  .planning-col-left .planning-panel-kicker {
    margin-bottom: 4px;
    font-size: .62rem;
    letter-spacing: .18em;
  }

  .planning-col-left .planning-panel-heading h5 {
    font-size: 1.02rem;
  }

  .planning-col-left .plan-header-actions {
    gap: .42rem !important;
  }

  .planning-col-left .plan-header-actions .btn {
    min-height: 34px;
    padding-left: .66rem;
    padding-right: .66rem;
    font-size: .84rem;
  }

  .planning-col-left .planning-form-stack {
    gap: 10px !important;
  }

  .planning-col-left .planning-form-stack .subgrid {
    padding: 11px;
    border-radius: 16px;
  }

  .planning-col-left .planning-accordion-toggle {
    padding: 11px 12px 9px;
    gap: 10px;
  }

  .planning-col-left .planning-accordion-body {
    padding: 0 12px 12px;
  }

  .planning-col-left .subgrid-title {
    gap: 8px;
    margin-bottom: 8px;
    font-size: .66rem;
    letter-spacing: .15em;
  }

  .planning-col-left .subgrid-title::after {
    opacity: .75;
  }

  .planning-col-left .planning-accordion-icon {
    font-size: .72rem;
  }

  .planning-col-left .form-label {
    font-size: .63rem;
    letter-spacing: .11em;
  }

  .planning-col-left .form-control,
  .planning-col-left .form-select {
    min-height: 34px;
    font-size: .84rem;
  }

  .planning-col-left .gasto-detalle-area {
    min-height: 78px;
  }

  .planning-col-left .planning-route-tools .small {
    font-size: .74rem;
  }

  .planning-col-left .planning-mini-calendar-shell {
    margin-bottom: 10px;
  }

  .planning-col-left .planning-mini-calendar-card {
    border-radius: 16px;
  }

  .planning-col-left .pmcal-main {
    padding: 11px 11px 12px;
  }

  .planning-col-left .planning-mini-calendar-header {
    gap: 10px;
    margin-bottom: 8px;
  }

  .planning-col-left .planning-mini-calendar-kicker {
    margin-bottom: 2px;
    font-size: .58rem;
  }

  .planning-col-left .planning-mini-calendar-title {
    font-size: .92rem;
  }

  .planning-col-left .planning-mini-calendar-nav {
    gap: 4px;
  }

  .planning-col-left .planning-mini-calendar-nav-btn {
    min-width: 1.78rem;
    width: 1.78rem;
    min-height: 1.78rem;
  }

  .planning-col-left .planning-mini-calendar-weekdays {
    gap: 4px;
    margin-bottom: 4px;
  }

  .planning-col-left .planning-mini-calendar-weekdays span {
    font-size: .58rem;
  }

  .planning-col-left .planning-mini-calendar-grid {
    gap: 4px;
  }

  .planning-col-left .planning-mini-calendar-day {
    min-height: 42px;
    padding: 5px 3px;
    border-radius: 10px;
  }

  .planning-col-left .planning-mini-calendar-day-number {
    font-size: .76rem;
  }

  .planning-col-left .planning-mini-calendar-day-count {
    min-width: 1.05rem;
    padding: 1px 5px;
    font-size: .58rem;
  }

  #exec-inline-engine #exec-activities-container,
  .planning-inline-exec-card #exec-activities-container {
    min-height: 740px;
    max-height: calc(100vh - 170px);
    overflow: auto;
  }

  .planning-agenda-card #agenda-container {
    min-height: 740px;
    max-height: calc(100vh - 170px);
    overflow: auto;
  }

  .planning-agenda-card.is-compact #agenda-container {
    min-height: 0;
    max-height: none;
    overflow: visible;
  }
}

@media (min-width: 992px) and (max-width: 1399.98px) {
  .planning-unified-grid > .planning-col-left {
    flex: 0 0 34%;
    width: 34%;
    max-width: 34%;
  }

  .planning-unified-grid > .planning-col-center {
    flex: 0 0 66%;
    width: 66%;
    max-width: 66%;
  }

  .planning-unified-sidebar {
    position: sticky;
    top: 82px;
  }

  .planning-col-left .planning-entry-card .card-header,
  .planning-unified-page .planning-agenda-card .card-header {
    padding: 15px 16px 13px;
  }

  .planning-col-left .planning-entry-card-body,
  .planning-agenda-body {
    padding: 14px;
  }

  .planning-col-left .planning-panel-kicker,
  .planning-history-kicker {
    font-size: .61rem;
    letter-spacing: .15em;
  }

  .planning-col-left .planning-panel-heading h5,
  .planning-history-title h6 {
    font-size: .98rem;
  }

  .planning-col-left .plan-header-actions {
    gap: .42rem !important;
  }

  .planning-col-left .plan-header-actions .btn,
  .planning-unified-page .planning-agenda-card .btn.btn-sm.btn-view-mode {
    min-height: 34px;
    padding-left: .72rem;
    padding-right: .72rem;
    font-size: .82rem;
  }

  .planning-col-left .planning-form-stack {
    gap: 10px !important;
  }

  .planning-col-left .planning-form-stack .subgrid {
    padding: 10px;
    border-radius: 16px;
  }

  .planning-col-left .planning-accordion-toggle {
    padding: 10px 12px 9px;
  }

  .planning-col-left .planning-accordion-body {
    padding: 0 12px 12px;
  }

  .planning-col-left .form-label {
    font-size: .62rem;
    letter-spacing: .1em;
  }

  .planning-col-left .form-control,
  .planning-col-left .form-select {
    min-height: 33px;
    font-size: .82rem;
  }

  .planning-col-left .gasto-detalle-area {
    min-height: 74px;
  }

  .planning-col-left .planning-route-tools .small,
  .planning-col-left #bitrixSyncTargetHint {
    font-size: .73rem;
  }

  .planning-col-left .planning-mini-calendar-shell {
    margin-bottom: 8px;
  }

  .planning-col-left .pmcal-main {
    padding: 10px 10px 12px;
  }

  .planning-col-left .planning-mini-calendar-title {
    font-size: .88rem;
  }

  .planning-col-left .planning-mini-calendar-day {
    min-height: 40px;
    padding: 4px 3px;
  }

  .planning-col-left .planning-mini-calendar-day-number {
    font-size: .74rem;
  }

  .planning-col-left .planning-mini-calendar-day-count {
    min-width: 1rem;
    font-size: .56rem;
  }

  .planning-agenda-card .planning-mini-week-toggle {
    min-width: 188px;
    min-height: 36px;
    padding: 6px 10px;
  }

  .planning-mini-week-toggle-label {
    font-size: .58rem;
  }

  .planning-mini-week-toggle-value {
    font-size: .76rem;
  }
}

.planning-unified-page .btn.btn-view-mode.btn-sm {
  min-height: 36px;
}

.planning-unified-page .planning-route-tools .btn.btn-view-mode,
.planning-unified-page .plan-header-actions .btn.btn-view-mode,
.planning-unified-page .planning-inline-exec-card .btn.btn-view-mode,
.planning-unified-page .planning-agenda-card .btn.btn-view-mode {
  border-radius: 999px;
}

@media (max-width: 1399.98px) {

  .planning-agenda-card #agenda-container,
  .planning-inline-exec-card #exec-activities-container {
    min-height: 0;
  }
}

@media (max-width: 991.98px) {
  .planning-unified-page::before {
    height: 280px;
  }

  .planning-unified-page .planning-entry-card .card-header,
  .planning-unified-page .planning-inline-exec-card .card-header,
  .planning-unified-page .planning-agenda-card .card-header {
    padding: 16px;
  }

  .planning-entry-card-body,
  .planning-inline-exec-body,
  .planning-agenda-body,
  .planning-unified-page .planning-form-stack .subgrid {
    padding: 14px;
  }

  .planning-unified-page .planning-route-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .planning-mini-dashboard-toolbar {
    width: 100%;
    margin-left: 0;
  }

  .planning-mini-week-control {
    width: 100%;
  }

  .route-suggestion-inline-btn {
    width: 100%;
    justify-content: center;
  }

  .planning-mini-week-toggle {
    width: 100%;
    min-width: 0;
  }

  .planning-mini-week-panel {
    left: 0;
    right: 0;
  }

  .planning-mini-week-control.is-open {
    z-index: 520;
  }

  .planning-mini-week-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    width: auto;
    max-width: none;
    z-index: 530;
  }

  .planning-history-mode-hint {
    max-width: none;
  }

  .planning-unified-page .planning-history-mode-select {
    width: 100%;
    justify-content: space-between;
  }

  .planning-unified-page .planning-history-mode-select .form-select {
    min-width: 0;
    flex: 1 1 auto;
  }
}

/* Gastos reales: titulo azul oscuro + cabecera de tabla en franja ploma (modo claro) */
html:not(.theme-dark) .real-expenses-card .card-header {
  background: linear-gradient(180deg, #1f3f6f 0%, #18345d 100%);
  border-bottom: 1px solid #2d538b;
}

html:not(.theme-dark) .real-expenses-card .card-header h6,
html:not(.theme-dark) .real-expenses-card .card-header i {
  color: #eef4ff;
}

html:not(.theme-dark) .real-expenses-card .card-header .text-muted {
  color: #c8d7ef !important;
}

html:not(.theme-dark) .real-expenses-card .table thead th {
  background: linear-gradient(180deg, #e4e7ee 0%, #d7dce5 100%);
  color: #2c3442;
  border-bottom: 1px solid #bcc5d2;
}

.subgrid {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--subgrid-bg);
  padding: 8px;
}

.subgrid-title {
  font-size: .8rem;
  font-weight: 700;
  color: var(--subgrid-title);
  margin-bottom: 6px;
}

.map-open-btn {
  font-size: .72rem;
  line-height: 1;
  padding: .28rem .5rem;
}

.form-label {
  margin-bottom: 3px;
  font-size: .78rem;
  color: var(--field-label);
}

.form-control,
.form-select {
  background: var(--input-bg);
  border-color: var(--input-border);
  color: var(--input-text);
}

.form-control::placeholder {
  color: var(--input-placeholder);
}

.form-control:focus,
.form-select:focus {
  background: var(--input-bg);
  border-color: var(--accent);
  color: var(--input-text);
  box-shadow: 0 0 0 .2rem rgba(47, 98, 255, .16);
}

.form-control-sm,
.form-select-sm {
  min-height: 32px;
  font-size: .86rem;
}

.plan-cost-card {
  display: flex;
  flex-direction: column;
}

.plan-cost-grid {
  flex: 1;
}

.gasto-detalle-area {
  min-height: 110px;
  resize: vertical;
}

#map {
  height: 195px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

#exec-map {
  height: 150px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

#execRouteMap {
  height: 416px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

#planningRouteMapModal .leaflet-control-attribution,
#execRouteModal .leaflet-control-attribution {
  display: none !important;
}

#planningRouteMapModal,
#planningRouteSuggestionModal,
#execAttachmentsModal,
#execRouteModal,
#execPlanModal,
#planningExecutionModal,
#activityStatusModal,
#planningMiniCalendarModal,
#scheduleActivityModal {
  z-index: 2310;
}

body.exec-modal-open .modal-backdrop.show {
  z-index: 2300;
}

body.planning-modal-open .modal-backdrop.show {
  z-index: 2300;
}

.quick-plan-fill {
  border-radius: 999px;
  padding-left: .65rem;
  padding-right: .65rem;
}

.cost-hints {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hint-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--hint-border);
  background: var(--hint-bg);
  color: var(--hint-text);
  border-radius: 999px;
  padding: .22rem .62rem;
  font-size: .76rem;
  font-weight: 600;
}

.planning-unified-page #agenda-container .table thead th,
.planning-unified-page #exec-activities-container .table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 14px 14px;
  background:
    linear-gradient(180deg, rgba(244, 247, 252, 0.96) 0%, rgba(236, 241, 248, 0.96) 100%);
  border-bottom: 1px solid var(--planning-shell-border);
  color: var(--planning-muted);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

html.theme-dark .planning-unified-page #agenda-container .table thead th,
html.theme-dark .planning-unified-page #exec-activities-container .table thead th {
  background:
    linear-gradient(180deg, rgba(14, 26, 45, 0.96) 0%, rgba(11, 20, 35, 0.96) 100%);
}

.planning-unified-page #agenda-container .table td,
.planning-unified-page #agenda-container .table th,
.planning-unified-page #exec-activities-container .table td,
.planning-unified-page #exec-activities-container .table th {
  white-space: nowrap;
  font-size: .82rem;
}

.planning-unified-page #agenda-container .table tbody td,
.planning-unified-page #exec-activities-container .table tbody td {
  padding: 13px 14px;
  color: var(--planning-title);
  border-bottom: 1px solid var(--planning-line);
}

.planning-unified-page #agenda-container .agenda-row-active>td {
  background: rgba(47, 98, 255, .11);
}

.planning-unified-page #agenda-container .table tbody tr:hover td,
.planning-unified-page #exec-activities-container .table tbody tr:hover td {
  background: rgba(59, 130, 246, 0.04);
}

.planning-unified-page #agenda-container .agenda-actions-cell {
  white-space: nowrap;
  min-width: 0;
  width: 1%;
  overflow: hidden;
  vertical-align: middle;
}

.planning-unified-page #agenda-container .agenda-actions-wrap {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  width: 100%;
  min-width: max-content;
  max-width: 100%;
}

.planning-unified-page #agenda-container .agenda-actions-wrap::-webkit-scrollbar {
  height: 4px;
}

.planning-unified-page #agenda-container .agenda-table thead th:last-child,
.planning-unified-page #agenda-container .agenda-table tbody td:last-child {
  min-width: 0;
  width: 1%;
  white-space: nowrap;
}

.planning-unified-page #agenda-container .agenda-table.agenda-table-compact thead th:last-child,
.planning-unified-page #agenda-container .agenda-table.agenda-table-compact tbody td:last-child {
  min-width: auto;
  width: auto;
}

.planning-unified-page #agenda-container .agenda-exec-inline-row>td {
  padding: 12px 10px 14px;
  background: rgba(243, 247, 255, 0.92);
  border-bottom: 1px solid var(--planning-line);
  text-align: center;
  vertical-align: top;
}

.planning-unified-page #agenda-container .agenda-exec-inline-row>td:first-child {
  border-left: 0;
}

.planning-unified-page #agenda-container .agenda-exec-inline-row .form-control {
  min-height: 38px;
  margin-left: auto;
  margin-right: auto;
  max-width: 108px;
  text-align: center;
}

.planning-unified-page #agenda-container .agenda-inline-exec-kicker {
  margin-bottom: 8px;
  color: var(--planning-muted);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.2;
  text-align: center;
}

.planning-unified-page #agenda-container .agenda-inline-exec-static,
.planning-unified-page #agenda-container .agenda-inline-exec-total {
  font-weight: 700;
  color: var(--planning-title);
}

.planning-unified-page #agenda-container .agenda-inline-exec-support {
  min-width: 240px;
  text-align: center;
}

.planning-unified-page #agenda-container .agenda-inline-exec-support-strip {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
}

.planning-unified-page #agenda-container .agenda-inline-exec-support-item {
  min-width: 70px;
}

.planning-unified-page #agenda-container .agenda-inline-exec-support-item .agenda-inline-exec-kicker {
  margin-bottom: 5px;
  font-size: .62rem;
  letter-spacing: .06em;
}

.planning-unified-page #agenda-container .agenda-exec-inline-time {
  min-height: 34px !important;
  max-width: 84px !important;
  padding-left: .35rem;
  padding-right: .35rem;
  font-size: .82rem;
}

.planning-unified-page #agenda-container .agenda-inline-exec-actions-cell {
  min-width: 190px;
  max-width: 100%;
  text-align: center;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.planning-unified-page #agenda-container .agenda-inline-exec-actions-cell.is-wide {
  min-width: 360px;
  text-align: right;
}

.planning-unified-page #agenda-container .agenda-inline-exec-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 5px;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.planning-unified-page #agenda-container .agenda-inline-exec-actions .btn {
  min-width: 0;
  flex: 0 0 auto;
  white-space: nowrap;
  padding-left: .66rem;
  padding-right: .66rem;
  font-size: .78rem;
  justify-content: center;
}

.planning-unified-page #agenda-container .agenda-exec-attach-trigger {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.planning-unified-page #agenda-container .agenda-inline-exec-actions::-webkit-scrollbar {
  height: 4px;
}

.planning-unified-page #agenda-container .agenda-exec-inline-detail {
  max-width: 300px !important;
  text-align: left !important;
}

.planning-unified-page #agenda-container .agenda-exec-inline-row>td:nth-child(11) {
  text-align: right;
}

.planning-unified-page #agenda-container .agenda-inline-exec-actions .btn,
.planning-unified-page #agenda-container .agenda-inline-exec-actions .badge {
  margin: 0;
  flex: 0 0 auto;
  white-space: nowrap;
}

.planning-unified-page #agenda-container .agenda-inline-attach-badge {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.planning-unified-page #agenda-container .agenda-inline-attach-badge.is-filled {
  background: rgba(14, 165, 233, 0.12) !important;
  color: #0c4a6e !important;
  border-color: rgba(14, 165, 233, 0.26);
}

.planning-unified-page #agenda-container .agenda-actions-cell .btn,
.planning-unified-page #agenda-container .agenda-actions-cell .badge,
.planning-unified-page #agenda-container .agenda-actions-cell>span {
  margin: 0;
  flex: 0 0 auto;
  white-space: nowrap;
}

.planning-unified-page #agenda-container .agenda-actions-cell .btn {
  min-width: 0;
  padding-left: .62rem;
  padding-right: .62rem;
  font-size: .79rem;
}

.planning-unified-page #agenda-container .agenda-actions-cell .agenda-action-icon-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.planning-unified-page #agenda-container .agenda-actions-cell .agenda-action-icon-btn i {
  font-size: .84rem;
}

.planning-unified-page #agenda-container .agenda-actions-cell .btn-view-mode.is-back {
  padding-left: .88rem;
  padding-right: .88rem;
}

.planning-unified-page #agenda-container .agenda-actions-cell .agenda-action-icon-btn.btn-view-mode.is-back {
  padding: 0;
}

.planning-unified-page #agenda-container .agenda-col-activity {
  min-width: 300px;
  width: 31%;
}

.planning-unified-page #agenda-container .agenda-detail-main {
  min-width: 300px;
  max-width: 380px;
  white-space: normal;
  line-height: 1.3;
}

.planning-unified-page #agenda-container .agenda-detail-main .agenda-truncate {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.planning-unified-page #agenda-container .agenda-detail-time {
  margin-bottom: 4px;
  color: var(--planning-muted);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.2;
}

.planning-unified-page #agenda-container .agenda-detail-client {
  color: var(--planning-title);
  font-size: .96rem;
  font-weight: 700;
  line-height: 1.2;
}

.planning-unified-page #agenda-container .agenda-detail-meta,
.planning-unified-page #agenda-container .agenda-detail-note {
  margin-top: 4px;
  color: var(--planning-muted);
  font-size: .76rem;
  line-height: 1.35;
  white-space: normal;
}

.planning-unified-page #agenda-container .agenda-detail-note {
  color: #5b6f8e;
}

.planning-unified-page #agenda-container .agenda-state-cell {
  min-width: 120px;
}

.planning-unified-page #agenda-container .agenda-state-meta {
  margin-top: 8px;
  color: var(--planning-muted);
  font-size: .7rem;
  line-height: 1.35;
  white-space: normal;
  max-width: 220px;
}

.planning-unified-page #agenda-container .agenda-row-cancelled td {
  color: #76859d;
  background: rgba(148, 163, 184, 0.14);
}

.planning-unified-page #agenda-container .agenda-row-cancelled .agenda-truncate {
  text-decoration: line-through;
}

.planning-unified-page #agenda-container .agenda-row-relegated td {
  color: #7b8798;
  background: rgba(148, 163, 184, 0.08);
}

.planning-unified-page #agenda-container .agenda-row-reprogrammed td {
  background: rgba(245, 158, 11, 0.06);
}

.planning-unified-page #agenda-container .agenda-row-history-only td {
  color: #7b8798;
  background: rgba(226, 232, 240, 0.34);
}

.planning-unified-page #agenda-container .agenda-row-executed td {
  background: rgba(16, 185, 129, 0.04);
}

.planning-unified-page #agenda-container .agenda-compact-summary-row.is-open>td {
  background: rgba(219, 234, 254, 0.24);
}

.planning-unified-page #agenda-container .agenda-compact-date-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.planning-unified-page #agenda-container .agenda-compact-toggle-btn {
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.planning-unified-page #agenda-container .agenda-compact-toggle-btn i {
  font-size: .72rem;
}

.planning-unified-page #agenda-container .agenda-compact-day-detail-row>td {
  padding: 0;
  border-top: 0;
}

.planning-unified-page #agenda-container .agenda-compact-day-shell {
  padding: 14px 16px 16px;
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.76) 0%, rgba(255, 255, 255, 0.86) 100%);
}

.planning-unified-page #agenda-container .agenda-compact-day-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.planning-unified-page #agenda-container .agenda-compact-day-title {
  font-size: .92rem;
  font-weight: 800;
  color: var(--planning-title);
}

.planning-unified-page #agenda-container .agenda-compact-day-help {
  margin-top: 4px;
  font-size: .76rem;
  color: var(--planning-muted);
}

.planning-unified-page #agenda-container .agenda-compact-day-table-wrap {
  border: 1px solid rgba(203, 213, 225, 0.76);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  overflow: auto;
}

.planning-unified-page #agenda-container .agenda-compact-day-table thead th {
  font-size: .66rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--planning-muted);
  white-space: nowrap;
}

.planning-unified-page #agenda-container .agenda-compact-day-table tbody td {
  vertical-align: middle;
}

.planning-unified-page #agenda-container .agenda-compact-day-transfer {
  min-width: 180px;
}

.planning-unified-page #agenda-container .agenda-compact-day-transfer .small {
  line-height: 1.35;
}

.planning-unified-page #agenda-container .agenda-compact-day-action {
  white-space: nowrap;
}

.planning-unified-page #agenda-container .agenda-compact-day-approval-row .dash-approval-pill {
  display: inline-flex;
}

.planning-unified-page #agenda-container .agenda-compact-day-main {
  min-width: 240px;
}

.planning-unified-page #agenda-container .agenda-compact-day-time {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--planning-muted);
  margin-bottom: 4px;
}

.planning-unified-page #agenda-container .agenda-compact-day-client {
  font-size: .92rem;
  font-weight: 700;
  color: var(--planning-title);
  line-height: 1.2;
}

.planning-unified-page #agenda-container .agenda-compact-day-meta,
.planning-unified-page #agenda-container .agenda-compact-day-note {
  margin-top: 4px;
  font-size: .76rem;
  color: var(--planning-muted);
  line-height: 1.35;
}

.planning-unified-page #agenda-container .agenda-compact-day-table .form-control {
  min-width: 92px;
  max-width: 110px;
  text-align: center;
}

.planning-unified-page #agenda-container .agenda-compact-day-table .agenda-exec-inline-detail {
  min-width: 220px;
  max-width: 320px !important;
  text-align: left !important;
}

.planning-unified-page #agenda-container .agenda-compact-day-attachments {
  min-width: 120px;
  text-align: center;
}

.planning-unified-page #agenda-container .agenda-compact-day-attachments .btn,
.planning-unified-page #agenda-container .agenda-compact-day-attachments .badge {
  display: inline-flex;
  margin: 0;
}

.planning-unified-page #agenda-container .agenda-compact-day-attachments {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.planning-unified-page #agenda-container .agenda-compact-day-activity-row.is-cancelled td {
  background: rgba(148, 163, 184, 0.14);
  color: #76859d;
}

.planning-unified-page #agenda-container .agenda-compact-day-activity-row.is-executed td {
  background: rgba(16, 185, 129, 0.05);
}

.planning-unified-page #agenda-container .agenda-compact-day-activity-row.is-reprogrammed td {
  background: rgba(245, 158, 11, 0.08);
}

.planning-unified-page #agenda-container .agenda-compact-day-activity-row.is-relegated td {
  background: rgba(148, 163, 184, 0.08);
  color: #7b8798;
}

.planning-unified-page #agenda-container .agenda-compact-day-activity-row.is-cancelled .form-control,
.planning-unified-page #agenda-container .agenda-compact-day-activity-row.is-executed .form-control,
.planning-unified-page #agenda-container .agenda-compact-day-activity-row.is-relegated .form-control {
  background: rgba(241, 245, 249, 0.92);
  color: #64748b;
  border-color: rgba(148, 163, 184, 0.28);
  box-shadow: none;
}

.planning-unified-page #agenda-container .agenda-compact-day-activity-row.is-cancelled .btn.disabled,
.planning-unified-page #agenda-container .agenda-compact-day-activity-row.is-executed .btn.disabled,
.planning-unified-page #agenda-container .agenda-compact-day-activity-row.is-relegated .btn.disabled {
  color: #64748b;
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(255, 255, 255, 0.74);
  opacity: 1;
}

.planning-unified-page #agenda-container .agenda-row-executed .btn.disabled,
.planning-unified-page #agenda-container .agenda-compact-day-activity-row.is-executed .btn.disabled {
  color: #166534;
  border-color: rgba(34, 197, 94, 0.24);
  background: rgba(220, 252, 231, 0.76);
  box-shadow: none;
}

.planning-unified-page .agenda-truncate,
.planning-unified-page .exec-inline-truncate {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planning-unified-page .agenda-cell-client .agenda-truncate {
  max-width: 180px;
}

.planning-unified-page .agenda-cell-detail .agenda-truncate,
.planning-unified-page .exec-inline-cell-detail .exec-inline-truncate {
  max-width: 280px;
}

.planning-unified-page #agenda-container .btn-sm,
.planning-unified-page #exec-activities-container .btn-sm {
  border-radius: 999px;
}

.planning-unified-page #agenda-container .alert,
.planning-unified-page #exec-activities-container .alert,
.planning-unified-page .exec-activities-state {
  border-radius: 18px;
  border-color: var(--planning-shell-border);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--planning-shadow-soft);
}

html.theme-dark .planning-unified-page #agenda-container .alert,
html.theme-dark .planning-unified-page #exec-activities-container .alert,
html.theme-dark .planning-unified-page .exec-activities-state {
  background: rgba(9, 16, 30, 0.82);
}

html.theme-dark .planning-unified-page #agenda-container .agenda-row-cancelled td {
  color: #93a2bb;
  background: rgba(71, 85, 105, 0.24);
}

html.theme-dark .planning-unified-page #agenda-container .agenda-exec-inline-row>td {
  background: rgba(11, 20, 35, 0.92);
}

html.theme-dark .planning-unified-page #agenda-container .agenda-inline-exec-kicker {
  color: #9eb4d4;
}

html.theme-dark .planning-unified-page #agenda-container .agenda-inline-exec-static,
html.theme-dark .planning-unified-page #agenda-container .agenda-inline-exec-total {
  color: #f8fbff;
}

html.theme-dark .planning-unified-page #agenda-container .agenda-inline-attach-badge {
  background: rgba(30, 41, 59, 0.84) !important;
  color: #dbeafe !important;
  border-color: rgba(71, 85, 105, 0.52);
}

html.theme-dark .planning-unified-page #agenda-container .agenda-inline-attach-badge.is-filled {
  background: rgba(8, 47, 73, 0.82) !important;
  color: #bae6fd !important;
  border-color: rgba(14, 165, 233, 0.28);
}

html.theme-dark .planning-unified-page #agenda-container .agenda-detail-client {
  color: #f8fbff;
}

html.theme-dark .planning-unified-page #agenda-container .agenda-detail-meta,
html.theme-dark .planning-unified-page #agenda-container .agenda-detail-note,
html.theme-dark .planning-unified-page #agenda-container .agenda-detail-time {
  color: #9fb3d3;
}

html.theme-dark .planning-unified-page #agenda-container .agenda-row-relegated td {
  color: #8fa0bb;
  background: rgba(51, 65, 85, 0.22);
}

html.theme-dark .planning-unified-page #agenda-container .agenda-row-reprogrammed td {
  background: rgba(245, 158, 11, 0.1);
}

html.theme-dark .planning-unified-page #agenda-container .agenda-row-history-only td {
  color: #9aacc6;
  background: rgba(71, 85, 105, 0.18);
}

html.theme-dark .planning-unified-page #agenda-container .agenda-row-executed td {
  background: rgba(16, 185, 129, 0.08);
}

html.theme-dark .planning-unified-page #agenda-container .agenda-compact-summary-row.is-open>td {
  background: rgba(30, 64, 175, 0.16);
}

html.theme-dark .planning-unified-page #agenda-container .agenda-compact-date-cell {
  color: #e6f0ff;
}

html.theme-dark .planning-unified-page #agenda-container .agenda-compact-day-shell {
  background: linear-gradient(180deg, rgba(12, 21, 38, 0.94) 0%, rgba(8, 15, 28, 0.92) 100%);
}

html.theme-dark .planning-unified-page #agenda-container .agenda-compact-day-table-wrap {
  border-color: rgba(62, 84, 118, 0.74);
  background: rgba(10, 20, 36, 0.9);
}

html.theme-dark .planning-unified-page #agenda-container .agenda-compact-day-title,
html.theme-dark .planning-unified-page #agenda-container .agenda-compact-day-client {
  color: #f8fbff;
}

html.theme-dark .planning-unified-page #agenda-container .agenda-compact-day-help,
html.theme-dark .planning-unified-page #agenda-container .agenda-compact-day-time,
html.theme-dark .planning-unified-page #agenda-container .agenda-compact-day-meta,
html.theme-dark .planning-unified-page #agenda-container .agenda-compact-day-note {
  color: #9fb3d3;
}

html.theme-dark .planning-unified-page #agenda-container .agenda-compact-day-activity-row.is-cancelled td {
  background: rgba(71, 85, 105, 0.24);
  color: #93a2bb;
}

html.theme-dark .planning-unified-page #agenda-container .agenda-compact-day-activity-row.is-executed td {
  background: rgba(16, 185, 129, 0.08);
}

html.theme-dark .planning-unified-page #agenda-container .agenda-compact-day-activity-row.is-cancelled .form-control,
html.theme-dark .planning-unified-page #agenda-container .agenda-compact-day-activity-row.is-executed .form-control,
html.theme-dark .planning-unified-page #agenda-container .agenda-compact-day-activity-row.is-relegated .form-control {
  background: rgba(15, 23, 42, 0.88);
  color: #94a3b8;
  -webkit-text-fill-color: #94a3b8;
  border-color: rgba(71, 85, 105, 0.42);
  box-shadow: none;
  opacity: 1;
}

html.theme-dark .planning-unified-page #agenda-container .agenda-compact-day-table input[type="time"].form-control {
  color: #dbeafe;
  -webkit-text-fill-color: #dbeafe;
}

html.theme-dark .planning-unified-page #agenda-container .agenda-compact-day-table input[type="time"].form-control:disabled {
  color: #c8dcff;
  -webkit-text-fill-color: #c8dcff;
  opacity: 1;
}

html.theme-dark .planning-unified-page #agenda-container .agenda-compact-day-table input[type="time"].form-control::-webkit-datetime-edit,
html.theme-dark .planning-unified-page #agenda-container .agenda-compact-day-table input[type="time"].form-control::-webkit-datetime-edit-hour-field,
html.theme-dark .planning-unified-page #agenda-container .agenda-compact-day-table input[type="time"].form-control::-webkit-datetime-edit-minute-field,
html.theme-dark .planning-unified-page #agenda-container .agenda-compact-day-table input[type="time"].form-control::-webkit-datetime-edit-text {
  color: inherit;
  -webkit-text-fill-color: inherit;
}

html.theme-dark .planning-unified-page #agenda-container .agenda-compact-day-activity-row.is-cancelled .btn.disabled,
html.theme-dark .planning-unified-page #agenda-container .agenda-compact-day-activity-row.is-executed .btn.disabled,
html.theme-dark .planning-unified-page #agenda-container .agenda-compact-day-activity-row.is-relegated .btn.disabled {
  color: #9eb4d4;
  border-color: rgba(71, 85, 105, 0.48);
  background: rgba(15, 23, 42, 0.78);
  opacity: 1;
}

html.theme-dark .planning-unified-page #agenda-container .agenda-row-executed .btn.disabled,
html.theme-dark .planning-unified-page #agenda-container .agenda-compact-day-activity-row.is-executed .btn.disabled {
  color: #bbf7d0;
  border-color: rgba(74, 222, 128, 0.22);
  background: rgba(20, 83, 45, 0.42);
  box-shadow: none;
}

html.theme-dark .planning-unified-page #agenda-container .agenda-compact-day-activity-row.is-reprogrammed td {
  background: rgba(245, 158, 11, 0.12);
}

html.theme-dark .planning-unified-page #agenda-container .agenda-compact-day-activity-row.is-relegated td {
  background: rgba(51, 65, 85, 0.22);
  color: #8fa0bb;
}

.planning-unified-page #exec-activities-container .exec-inline-table .exec-inline-cell-client {
  min-width: 150px;
  max-width: 180px;
}

.planning-unified-page #exec-activities-container .exec-inline-table .exec-inline-cell-detail {
  min-width: 220px;
  max-width: 320px;
}

.planning-unified-page #exec-activities-container .exec-inline-table .exec-inline-input {
  min-width: 90px;
}

#exec-activities-container .exec-inline-table .exec-inline-detail {
  min-width: 220px;
}

#exec-activities-container .exec-inline-table .exec-inline-total {
  font-weight: 700;
}

#exec-activities-container .exec-inline-table .exec-inline-actions {
  min-width: 260px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem;
}

#exec-activities-container .exec-inline-table .exec-inline-actions .btn {
  margin: 0;
}

#exec-activities-container .exec-inline-table .exec-inline-badge {
  margin: 0;
}

#exec-activities-container .exec-inline-table .exec-inline-badge.is-filled {
  background: rgba(14, 165, 233, 0.12) !important;
  color: #0c4a6e !important;
  border: 1px solid rgba(14, 165, 233, 0.24);
}

#exec-activities-container .exec-inline-table .btn-exec-attach-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#exec-activities-container .exec-row-running {
  opacity: .65;
}

#exec-activities-container .exec-row-chat-active > td {
  background: rgba(55, 106, 212, 0.1);
}

.exec-chat-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1042;
  border: 1px solid rgba(188, 202, 228, 0.92);
  border-radius: 999px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.96), rgba(238, 244, 255, 0.92) 52%, rgba(224, 234, 252, 0.94)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(240, 246, 255, 0.9));
  color: #22395f;
  box-shadow: 0 18px 34px rgba(39, 64, 109, 0.16);
  backdrop-filter: blur(12px);
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: .72rem .92rem;
  font-weight: 700;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  animation: exec-chat-fab-breathe 5.6s ease-in-out infinite;
}

.exec-chat-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 40px rgba(39, 64, 109, 0.22);
  border-color: rgba(102, 134, 193, 0.9);
}

.route-suggestion-fab {
  bottom: 92px;
  animation-duration: 6.4s;
}

.route-suggestion-fab.is-empty {
  opacity: .86;
}

.route-suggestion-fab-icon {
  background: linear-gradient(135deg, #1e63ff, #3fa0ff);
  color: #fff;
  box-shadow: 0 10px 22px rgba(42, 99, 214, 0.28);
}

.route-suggestion-fab-badge {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #18356f;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 800;
  padding: 0 .4rem;
}

.route-suggestion-inline-btn {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
}

.route-suggestion-inline-btn .route-suggestion-fab-badge {
  position: static;
  margin-left: .08rem;
}

.route-suggestion-inline-btn.is-empty {
  opacity: .88;
}

.route-suggestion-card {
  border: 1px solid rgba(177, 192, 220, 0.72);
  border-radius: 18px;
  padding: 1rem 1rem .95rem;
  background: linear-gradient(180deg, rgba(249, 251, 255, 0.96), rgba(242, 246, 255, 0.9));
}

.route-suggestion-card + .route-suggestion-card {
  margin-top: .9rem;
}

.route-suggestion-card.is-muted {
  opacity: .88;
}

.route-suggestion-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .8rem;
  margin-bottom: .65rem;
}

.route-suggestion-date {
  font-weight: 800;
  color: #16315e;
}

.route-suggestion-metrics {
  color: #4c5f83;
  font-size: .86rem;
}

.route-suggestion-badge {
  border-radius: 999px;
  padding: .36rem .7rem;
  font-size: .76rem;
  font-weight: 700;
  white-space: nowrap;
}

.route-suggestion-badge.is-positive {
  background: rgba(20, 152, 106, 0.14);
  color: #0f7b57;
}

.route-suggestion-badge.is-neutral {
  background: rgba(61, 108, 198, 0.12);
  color: #254e96;
}

.route-suggestion-note {
  color: #546781;
  font-size: .85rem;
  margin-bottom: .7rem;
}

.route-suggestion-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.route-suggestion-list-title {
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 800;
  color: #5f7395;
  margin-bottom: .5rem;
}

.route-suggestion-order {
  margin: 0;
  padding-left: 1.15rem;
}

.route-suggestion-order li {
  margin-bottom: .45rem;
  color: #1c335b;
}

.route-suggestion-order li span {
  display: block;
  color: #647695;
  font-size: .82rem;
}

.exec-chat-fab-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.exec-chat-fab-text {
  line-height: 1;
}

.exec-chat-fab-aura {
  position: relative;
  overflow: hidden;
  border-radius: 38% 62% 58% 42% / 42% 40% 60% 58%;
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow:
    0 8px 18px rgba(60, 94, 154, 0.2),
    inset -4px -6px 10px rgba(255, 255, 255, 0.55),
    inset 5px 6px 12px rgba(255, 255, 255, 0.68);
  background: transparent;
  animation:
    exec-chat-aura-float 4.8s ease-in-out infinite,
    exec-chat-aura-spin 13s linear infinite;
}

.exec-chat-fab-aura::before,
.exec-chat-fab-aura::after {
  content: "";
  position: absolute;
  inset: -18%;
  border-radius: inherit;
  pointer-events: none;
}

.exec-chat-fab-aura::before {
  background:
    conic-gradient(from 0deg,
      rgba(47, 98, 255, 0) 0deg,
      rgba(47, 98, 255, 0.26) 70deg,
      rgba(250, 204, 21, 0.28) 130deg,
      rgba(255, 255, 255, 0.1) 200deg,
      rgba(47, 98, 255, 0) 360deg);
  filter: blur(6px);
  opacity: .82;
  animation: exec-chat-aura-halo-rotate 6.8s linear infinite;
}

.exec-chat-fab-aura::after {
  inset: 10%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0) 56%),
    radial-gradient(circle at 72% 68%, rgba(47, 98, 255, 0.16), rgba(47, 98, 255, 0) 58%);
  opacity: .9;
  animation: exec-chat-aura-glow-pulse 2.8s ease-in-out infinite;
}

.exec-chat-fab-aura-blob {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.54) 34%, rgba(223, 231, 247, 0.18) 62%),
    linear-gradient(135deg, rgba(244, 247, 253, 0.98), rgba(223, 230, 242, 0.86));
  animation:
    exec-chat-aura-morph 12s ease-in-out infinite alternate,
    exec-chat-aura-glass-shift 7s ease-in-out infinite;
}

.exec-chat-fab-aura-wire,
.exec-chat-fab-aura-node,
.exec-chat-fab-aura-core {
  position: absolute;
  z-index: 1;
}

.exec-chat-fab-aura-wire {
  height: 1.2px;
  transform-origin: left center;
  background:
    repeating-linear-gradient(90deg,
      rgba(77, 96, 132, 0.08) 0 3px,
      rgba(62, 104, 188, 0.82) 3px 7px,
      rgba(250, 204, 21, 0.44) 7px 9px,
      transparent 9px 12px);
  background-size: 18px 1.2px;
  opacity: 0.88;
  animation: exec-chat-aura-wire-flow 6.2s linear infinite;
}

.exec-chat-fab-aura-wire-a {
  left: 7px;
  top: 11px;
  width: 14px;
  transform: rotate(14deg);
}

.exec-chat-fab-aura-wire-b {
  left: 15px;
  top: 14px;
  width: 11px;
  transform: rotate(-34deg);
}

.exec-chat-fab-aura-wire-c {
  left: 16px;
  top: 17px;
  width: 9px;
  transform: rotate(54deg);
  animation-duration: 8.4s;
}

.exec-chat-fab-aura-node {
  border-radius: 50%;
  box-shadow:
    0 0 10px rgba(67, 116, 207, 0.42),
    0 0 18px rgba(250, 204, 21, 0.18);
}

.exec-chat-fab-aura-node-a {
  left: 5px;
  top: 9px;
  width: 5.5px;
  height: 5.5px;
  background: #2f62ff;
  animation: exec-chat-aura-pulse 2.2s ease-in-out infinite;
}

.exec-chat-fab-aura-node-b {
  left: 16px;
  top: 12px;
  width: 4px;
  height: 4px;
  background: #41526f;
  animation: exec-chat-aura-pulse 2.4s ease-in-out infinite .7s;
}

.exec-chat-fab-aura-node-c {
  right: 5px;
  top: 7px;
  width: 6.5px;
  height: 6.5px;
  background: #facc15;
  animation: exec-chat-aura-pulse 2s ease-in-out infinite .2s;
}

.exec-chat-fab-aura-node-d {
  right: 8px;
  bottom: 8px;
  width: 4px;
  height: 4px;
  background: #2f62ff;
  animation: exec-chat-aura-pulse 2.6s ease-in-out infinite 1.1s;
}

.exec-chat-fab-aura-core {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -48%);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .08em;
  color: #263f68;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  animation:
    exec-chat-aura-core-float 3.6s ease-in-out infinite,
    exec-chat-aura-core-glint 2.8s ease-in-out infinite;
}

.exec-chat-fab:hover .exec-chat-fab-aura {
  animation-duration: 3.2s, 8.4s;
}

.exec-chat-fab:hover .exec-chat-fab-aura-wire {
  opacity: .96;
}

@keyframes exec-chat-aura-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: .66;
  }

  50% {
    transform: scale(1.62);
    opacity: 1;
  }
}

@keyframes exec-chat-fab-breathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 18px 34px rgba(39, 64, 109, 0.16);
  }

  50% {
    transform: translateY(-2px) scale(1.018);
    box-shadow: 0 24px 42px rgba(39, 64, 109, 0.22);
  }
}

@keyframes exec-chat-aura-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px) scale(1.03);
  }
}

@keyframes exec-chat-aura-spin {
  0%,
  100% {
    rotate: 0deg;
  }

  50% {
    rotate: 3deg;
  }
}

@keyframes exec-chat-aura-morph {
  0% {
    border-radius: 38% 62% 58% 42% / 42% 40% 60% 58%;
  }

  100% {
    border-radius: 60% 40% 36% 64% / 52% 64% 38% 48%;
  }
}

@keyframes exec-chat-aura-glass-shift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    filter: saturate(1);
  }

  50% {
    transform: translate3d(.8px, -1px, 0) scale(1.03);
    filter: saturate(1.08);
  }
}

@keyframes exec-chat-aura-halo-rotate {
  from {
    transform: rotate(0deg) scale(1);
  }

  50% {
    transform: rotate(180deg) scale(1.04);
  }

  to {
    transform: rotate(360deg) scale(1);
  }
}

@keyframes exec-chat-aura-glow-pulse {
  0%,
  100% {
    transform: scale(.94);
    opacity: .62;
  }

  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

@keyframes exec-chat-aura-wire-flow {
  from {
    background-position-x: 0;
  }

  to {
    background-position-x: -40px;
  }
}

@keyframes exec-chat-aura-core-float {
  0%,
  100% {
    transform: translate(-50%, -48%);
    opacity: .88;
  }

  50% {
    transform: translate(-50%, -52%);
    opacity: 1;
  }
}

@keyframes exec-chat-aura-core-glint {
  0%,
  100% {
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8), 0 0 0 rgba(47, 98, 255, 0);
  }

  50% {
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.86), 0 0 10px rgba(47, 98, 255, 0.22);
  }
}

.exec-chat-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2101;
  background: rgba(10, 20, 38, 0.42);
  backdrop-filter: blur(3px);
}

.exec-chat-backdrop.is-open {
  display: block;
}

.exec-chat-drawer {
  position: fixed;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: min(430px, calc(100vw - 24px));
  z-index: 2102;
  pointer-events: none;
  transform: translateX(calc(100% + 22px));
  transition: transform .22s ease;
}

.exec-chat-drawer.is-open {
  pointer-events: auto;
  transform: translateX(0);
}

.exec-chat-shell {
  height: 100%;
  min-height: 0;
  border: 1px solid rgba(182, 202, 233, 0.88);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(95, 148, 255, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(249, 252, 255, 0.98), rgba(241, 247, 255, 0.98));
  box-shadow: 0 24px 60px rgba(18, 41, 85, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.exec-chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  padding: 1rem 1rem .75rem;
  border-bottom: 1px solid rgba(188, 207, 235, 0.78);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 249, 255, 0.9));
}

.exec-chat-header-actions {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

.exec-chat-kicker {
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #5071a8;
  font-weight: 800;
  margin-bottom: .2rem;
}

.exec-chat-title {
  font-size: 1.1rem;
  color: #1d355d;
}

.exec-chat-meta {
  color: #61789d;
}

.exec-chat-close {
  border-radius: 999px;
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.exec-chat-voice-toggle {
  border-radius: 999px;
  min-width: 38px;
  height: 38px;
  padding: 0 .7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
}

.exec-chat-voice-toggle[aria-pressed="true"] {
  color: #1d5fd1;
  border-color: rgba(53, 102, 193, 0.34);
  background: rgba(53, 102, 193, 0.12);
}

.exec-chat-voice-toggle:disabled {
  opacity: .55;
}

.exec-chat-thread {
  flex: 1 1 0;
  overflow-y: auto;
  min-height: 0;
  padding: .95rem 1rem .5rem;
  display: flex;
  flex-direction: column;
  gap: .7rem;
}

.exec-chat-context-card,
.exec-chat-card {
  border: 1px solid rgba(191, 208, 235, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 28px rgba(17, 50, 108, 0.08);
}

.exec-chat-context-card {
  padding: .9rem;
}

.exec-chat-context-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
}

.exec-chat-context-date {
  font-size: .76rem;
  font-weight: 800;
  color: #5670a0;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.exec-chat-context-title {
  font-size: 1rem;
  font-weight: 800;
  color: #20395f;
  line-height: 1.2;
}

.exec-chat-context-sub,
.exec-chat-context-route {
  color: #60789d;
  font-size: .83rem;
  margin-top: .18rem;
}

.exec-chat-context-metrics,
.exec-chat-kv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
  margin-top: .75rem;
}

.exec-chat-metric-pill,
.exec-chat-kv {
  border: 1px solid rgba(193, 210, 236, 0.88);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f7faff);
  padding: .55rem .65rem;
}

.exec-chat-metric-pill span,
.exec-chat-kv span {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  color: #6780a5;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.exec-chat-metric-pill strong,
.exec-chat-kv strong {
  display: block;
  margin-top: .18rem;
  color: #1f365d;
  line-height: 1.25;
}

.exec-chat-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  padding: .18rem .7rem;
  font-size: .74rem;
  font-weight: 800;
}

.exec-chat-status-chip.is-info {
  color: #244f8f;
  background: rgba(48, 96, 187, 0.12);
}

.exec-chat-status-chip.is-warning {
  color: #8d5a18;
  background: rgba(236, 170, 31, 0.16);
}

.exec-chat-status-chip.is-success {
  color: #1d6a4e;
  background: rgba(29, 151, 108, 0.14);
}

.exec-chat-status-chip.is-danger {
  color: #8d3743;
  background: rgba(220, 88, 110, 0.14);
}

.exec-chat-bubble-row {
  display: flex;
}

.exec-chat-bubble-row.is-user {
  justify-content: flex-end;
}

.exec-chat-bubble {
  max-width: 88%;
  border-radius: 18px;
  padding: .7rem .85rem;
  font-size: .92rem;
  line-height: 1.4;
  box-shadow: 0 10px 20px rgba(20, 49, 99, 0.07);
}

.exec-chat-bubble.is-assistant {
  border: 1px solid rgba(191, 208, 235, 0.9);
  background: rgba(255, 255, 255, 0.92);
  color: #243a5d;
  border-top-left-radius: 8px;
}

.exec-chat-bubble.is-user {
  background: linear-gradient(135deg, #2f62ff, #2956e0);
  color: #fff;
  border-top-right-radius: 8px;
}

.exec-chat-bubble.is-assistant.is-success {
  border-color: rgba(58, 159, 118, 0.34);
  background: rgba(236, 252, 245, 0.96);
}

.exec-chat-bubble.is-assistant.is-warning {
  border-color: rgba(222, 164, 54, 0.34);
  background: rgba(255, 249, 235, 0.96);
}

.exec-chat-bubble.is-assistant.is-danger {
  border-color: rgba(204, 94, 114, 0.34);
  background: rgba(255, 241, 243, 0.96);
}

.exec-chat-panel {
  flex: 0 1 auto;
  min-height: 0;
  max-height: min(42vh, 410px);
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding: 0 1rem .85rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.exec-chat-tray {
  display: flex;
  align-items: center;
  gap: .45rem;
  overflow-x: auto;
  padding-bottom: .05rem;
}

.exec-chat-tray-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: .45rem .82rem;
  border-radius: 999px;
  border: 1px solid rgba(188, 206, 234, 0.96);
  background: rgba(255, 255, 255, 0.92);
  color: #44628f;
  font-size: .82rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(20, 49, 99, 0.06);
}

.exec-chat-tray-btn.is-active {
  color: #1d5fd1;
  border-color: rgba(53, 102, 193, 0.34);
  background: rgba(53, 102, 193, 0.12);
}

.exec-chat-tray-sheet {
  border: 1px solid rgba(191, 208, 235, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 28px rgba(17, 50, 108, 0.08);
  padding: .78rem .84rem;
}

.exec-chat-tray-sheet-title {
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #60789d;
  margin-bottom: .45rem;
}

.exec-chat-card {
  padding: .9rem;
}

.exec-chat-card.exec-chat-card-compact {
  padding: .72rem .8rem;
}

.exec-chat-card-title {
  font-size: .92rem;
  font-weight: 800;
  color: #21385e;
  margin-bottom: .35rem;
}

.exec-chat-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
}

.exec-chat-summary-total {
  color: #1f5fd2;
  font-size: .94rem;
  font-weight: 900;
}

.exec-chat-summary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .55rem;
}

.exec-chat-summary-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 28px;
  padding: .22rem .62rem;
  border-radius: 999px;
  border: 1px solid rgba(193, 210, 236, 0.9);
  background: linear-gradient(180deg, #ffffff, #f7faff);
  color: #5c769f;
  font-size: .76rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: normal;
}

.exec-chat-summary-chip.is-cost {
  color: #244f8f;
  background: rgba(46, 97, 190, 0.08);
}

.exec-chat-summary-note {
  margin-top: .55rem;
  color: #60789d;
  font-size: .78rem;
}

.exec-chat-summary-alert {
  margin-top: .55rem;
  border-radius: 14px;
  padding: .5rem .62rem;
  background: rgba(255, 249, 235, 0.96);
  border: 1px solid rgba(222, 164, 54, 0.28);
  color: #8d5a18;
  font-size: .78rem;
  font-weight: 700;
}

.exec-chat-card-copy,
.exec-chat-empty {
  color: #60789d;
  font-size: .84rem;
}

.exec-chat-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.exec-chat-activity-list {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  margin-top: .75rem;
}

.exec-chat-activity-option {
  width: 100%;
  border: 1px solid rgba(186, 204, 232, 0.92);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f7faff);
  padding: .72rem .8rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: .14rem;
  color: #223a61;
}

.exec-chat-activity-option.is-done {
  opacity: .82;
}

.exec-chat-activity-option strong {
  font-size: .95rem;
}

.exec-chat-activity-option span {
  font-size: .8rem;
  color: #627a9f;
}

.exec-chat-activity-date {
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 800;
}

.exec-chat-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
}

.exec-chat-field {
  display: flex;
  flex-direction: column;
  gap: .28rem;
}

.exec-chat-field span {
  font-size: .76rem;
  font-weight: 800;
  color: #5f789f;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.exec-chat-field-block {
  margin-top: .72rem;
}

.exec-chat-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: .8rem;
  padding-top: .75rem;
  border-top: 1px dashed rgba(185, 204, 232, 0.92);
  color: #294474;
  font-weight: 800;
}

.exec-chat-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .8rem;
}

.exec-chat-card-compact .exec-chat-form-actions {
  margin-top: .55rem;
}

.exec-chat-form-actions.exec-chat-form-actions-compact {
  margin-top: .2rem;
}

.exec-chat-composer {
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
  padding: .9rem 1rem 1rem;
  border-top: 1px solid rgba(188, 207, 235, 0.78);
  background: linear-gradient(180deg, rgba(247, 250, 255, 0.94), rgba(241, 247, 255, 0.98));
}

.exec-chat-composer textarea.form-control {
  min-height: 68px;
  border-radius: 16px;
}

.exec-chat-media-tray {
  display: flex;
  align-items: stretch;
  gap: .5rem;
  margin-top: .65rem;
  margin-bottom: .1rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.exec-chat-media-tray.is-open {
  animation: exec-chat-media-tray-in .18s ease-out;
}

.exec-chat-media-option {
  flex: 0 0 auto;
  min-width: 104px;
  border-radius: 16px;
  border: 1px solid rgba(188, 206, 234, 0.96);
  background: rgba(255, 255, 255, 0.94);
  color: #42608d;
  padding: .6rem .72rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  font-size: .78rem;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(20, 49, 99, 0.08);
}

.exec-chat-media-option i {
  font-size: 1rem;
  color: #1d5fd1;
}

.exec-chat-media-option span {
  white-space: nowrap;
}

.exec-chat-composer-actions {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  margin-top: .65rem;
}

.exec-chat-composer-actions .btn {
  flex: 1 1 0;
}

.exec-chat-composer-actions .exec-chat-clip-btn {
  flex: 0 0 48px;
  min-width: 48px;
  padding-inline: 0;
  border-radius: 14px;
}

.exec-chat-composer-actions .exec-chat-clip-btn.is-active {
  color: #1d5fd1;
  border-color: rgba(53, 102, 193, 0.34);
  background: rgba(53, 102, 193, 0.12);
}

#execChatMicBtn.is-listening {
  color: #0f5132;
  border-color: rgba(25, 135, 84, 0.32);
  background: rgba(25, 135, 84, 0.12);
}

@keyframes exec-chat-media-tray-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.exec-chat-open {
  overflow: hidden;
}

@media (max-width: 767.98px) {
  .exec-chat-fab {
    left: 12px;
    right: 12px;
    bottom: 12px;
    justify-content: center;
  }

  .route-suggestion-fab {
    bottom: 74px;
  }

  .route-suggestion-grid {
    grid-template-columns: 1fr;
  }

  .exec-chat-drawer {
    inset: auto 0 0 0;
    width: 100%;
    top: auto;
    bottom: 0;
    transform: translateY(calc(100% + 18px));
  }

  .exec-chat-drawer.is-open {
    transform: translateY(0);
  }

  .exec-chat-shell {
    height: min(86vh, 760px);
    border-radius: 24px 24px 0 0;
  }

  .exec-chat-thread {
    padding-bottom: .35rem;
  }

  .exec-chat-panel {
    max-height: min(30vh, 250px);
  }

  .exec-chat-context-metrics,
  .exec-chat-kv-grid,
  .exec-chat-form-grid {
    grid-template-columns: 1fr;
  }
}

#exec-activities-container .exec-day-groups {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

#exec-activities-container .exec-day-group {
  border: 1px solid rgba(128, 153, 190, .4);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(246, 250, 255, .98), rgba(238, 245, 255, .96));
  overflow: hidden;
}

#exec-activities-container .exec-day-group.is-open {
  border-color: rgba(97, 131, 186, .58);
  box-shadow: 0 8px 16px rgba(27, 57, 110, .1);
}

#exec-activities-container .exec-day-summary {
  width: 100%;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  padding: .62rem .8rem;
  text-align: left;
  color: var(--text-color);
}

#exec-activities-container .exec-day-summary:hover {
  background: rgba(67, 110, 187, .08);
}

#exec-activities-container .exec-day-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

#exec-activities-container .exec-day-title {
  font-size: .84rem;
  font-weight: 700;
  line-height: 1.2;
}

#exec-activities-container .exec-day-sub {
  font-size: .76rem;
  color: var(--muted-color);
  margin-top: 2px;
}

#exec-activities-container .exec-day-metrics {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}

#exec-activities-container .exec-day-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(96, 131, 188, .5);
  background: rgba(49, 93, 179, .1);
  color: #2b4f8d;
  font-size: .74rem;
  font-weight: 700;
  padding: .2rem .6rem;
  white-space: nowrap;
}

#exec-activities-container .exec-day-detail {
  border-top: 1px dashed rgba(112, 142, 191, .5);
  padding: .55rem;
}

#exec-activities-container .exec-day-detail .table-responsive {
  border-radius: 10px;
}

#execRouteMeta .exec-route-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem;
}

#execRouteMeta .exec-route-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(93, 124, 175, .48);
  border-radius: 999px;
  background: rgba(45, 87, 170, .09);
  color: #2d4f88;
  font-size: .76rem;
  font-weight: 700;
  padding: .2rem .6rem;
}

#execRouteMeta .exec-route-chip.is-from {
  border-color: rgba(44, 129, 102, .5);
  background: rgba(25, 131, 96, .1);
  color: #1f6e55;
}

#execRouteMeta .exec-route-chip.is-to {
  border-color: rgba(177, 103, 54, .52);
  background: rgba(186, 106, 53, .1);
  color: #8c4c20;
}

#agenda-container .agenda-table .agenda-col-client,
#agenda-container .agenda-table .agenda-cell-client {
  width: 12.5%;
  min-width: 150px;
  max-width: 180px;
}

#agenda-container .agenda-table .agenda-cell-detail {
  min-width: 220px;
  max-width: 320px;
}

#agenda-container .agenda-table .agenda-truncate {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agenda-row-active {
  background: rgba(47, 98, 255, .11);
}

.expense-detail-main {
  font-weight: 500;
  color: var(--text-color);
}

.expense-detail-meta {
  margin-top: 2px;
  font-size: .78rem;
  color: var(--muted-color);
  line-height: 1.25;
}

.exec-activities-state {
  border: 1px solid rgba(59, 93, 150, .48);
  border-radius: 10px;
  padding: .95rem 1rem;
  font-weight: 500;
  line-height: 1.35;
  background: linear-gradient(180deg, rgba(10, 22, 46, .96), rgba(7, 15, 31, .96));
  color: #d8e7ff;
  box-shadow: inset 0 1px 0 rgba(166, 191, 234, .09);
}

.exec-activities-state--empty {
  border-color: rgba(74, 109, 168, .5);
  color: #dbe9ff;
}

.exec-activities-state--error {
  border-color: rgba(170, 94, 94, .62);
  color: #ffd3d3;
  background: linear-gradient(180deg, rgba(54, 18, 26, .96), rgba(34, 12, 18, .96));
}

/* Fallback: if stale JS still injects Bootstrap alert blocks, keep dark visual */
html.theme-dark #exec-activities-container .alert {
  border-radius: 10px;
  border-width: 1px;
  box-shadow: inset 0 1px 0 rgba(166, 191, 234, .09);
}

html.theme-dark #exec-activities-container .alert.alert-light {
  border-color: rgba(74, 109, 168, .5);
  background: linear-gradient(180deg, rgba(10, 22, 46, .96), rgba(7, 15, 31, .96));
  color: #dbe9ff;
}

html.theme-dark #exec-activities-container .alert.alert-danger {
  border-color: rgba(170, 94, 94, .62);
  color: #ffd3d3;
  background: linear-gradient(180deg, rgba(54, 18, 26, .96), rgba(34, 12, 18, .96));
}

html.theme-dark #exec-activities-container .exec-day-group {
  border-color: rgba(62, 94, 143, .74);
  background: linear-gradient(180deg, rgba(10, 22, 43, .94), rgba(8, 16, 31, .94));
}

html.theme-dark #exec-activities-container .exec-day-group.is-open {
  border-color: rgba(93, 129, 187, .92);
  box-shadow: 0 10px 20px rgba(2, 9, 24, .46);
}

html.theme-dark #exec-activities-container .exec-day-summary:hover {
  background: rgba(63, 94, 143, .2);
}

html.theme-dark #exec-activities-container .exec-day-sub {
  color: #a9c1e4;
}

html.theme-dark #exec-activities-container .exec-day-pill {
  border-color: rgba(89, 124, 181, .74);
  background: rgba(53, 94, 177, .22);
  color: #d4e5ff;
}

html.theme-dark #exec-activities-container .exec-day-detail {
  border-top-color: rgba(77, 110, 163, .72);
}

html.theme-dark #exec-activities-container .exec-row-chat-active > td {
  background: rgba(53, 93, 179, 0.22);
}

/* ── Card view ──────────────────────────────────────────────────────────── */
.exec-card-view {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 0.5rem 0 1rem;
}

.exec-card-day-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.exec-card-day-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.25rem 0.5rem;
  border-bottom: 2px solid #e2e8f0;
}

.exec-card-day-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: #334155;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.exec-card-day-sub {
  font-size: 0.78rem;
  color: #64748b;
  flex: 1;
}

.exec-card-day-pill {
  font-size: 0.78rem;
  font-weight: 600;
  color: #1e40af;
  background: #eff6ff;
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
}

.exec-card-day-body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0.75rem;
}

/* Individual card */
.exec-activity-card {
  position: relative;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.exec-activity-card:hover {
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  border-color: #cbd5e1;
}

.exec-activity-card.exec-row-chat-active {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.exec-activity-card.is-done {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.exec-activity-card.is-terminal {
  opacity: 0.65;
}

.exec-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(1px);
  z-index: 2;
  pointer-events: none;
}

.exec-card-overlay-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #64748b;
  background: rgba(255,255,255,0.9);
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0.25rem 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Card header */
.exec-card-header {
  padding: 0.7rem 0.85rem 0.5rem;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.exec-card-header-main {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.exec-card-badge {
  font-size: 0.68rem;
  padding: 0.2em 0.55em;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.exec-card-badge.is-success   { background: #d1fae5; color: #065f46; }
.exec-card-badge.is-warning   { background: #fef3c7; color: #92400e; }
.exec-card-badge.is-danger    { background: #fee2e2; color: #991b1b; }
.exec-card-badge.is-info      { background: #dbeafe; color: #1e40af; }
.exec-card-badge.is-secondary { background: #f1f5f9; color: #475569; }

.exec-card-client {
  font-size: 0.9rem;
  color: #0f172a;
  font-weight: 700;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exec-card-equipo {
  font-size: 0.72rem;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 0.1em 0.45em;
  white-space: nowrap;
}

.exec-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
}

.exec-card-meta-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: #64748b;
}

.exec-card-meta-item .fas {
  font-size: 0.65rem;
  opacity: 0.7;
}

/* Card body — inputs */
.exec-card-body {
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.exec-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem 0.5rem;
}

.exec-card-times-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 0.5rem;
}

.exec-card-field {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.exec-card-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0;
}

.exec-card-detail-row .form-control {
  font-size: 0.8rem;
}

/* Card footer */
.exec-card-footer {
  padding: 0.55rem 0.85rem;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.exec-card-totals {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
}

.exec-card-total-real {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.exec-card-delta {
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  padding: 0.1em 0.4em;
}

.exec-card-delta.is-over  { color: #dc2626; background: #fee2e2; }
.exec-card-delta.is-under { color: #16a34a; background: #dcfce7; }
.exec-card-delta.is-even  { color: #64748b; background: #f1f5f9; }

.exec-card-plan-label {
  font-size: 0.72rem;
  color: #94a3b8;
}

.exec-card-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.exec-card-attach-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #3b82f6;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: 999px;
  min-width: 14px;
  height: 14px;
  line-height: 14px;
  text-align: center;
  padding: 0 2px;
}

/* Dark mode — card view */
html.theme-dark .exec-card-day-header {
  border-bottom-color: rgba(100, 130, 180, 0.3);
}

html.theme-dark .exec-card-day-title {
  color: #cbd5e1;
}

html.theme-dark .exec-card-day-sub {
  color: #94a3b8;
}

html.theme-dark .exec-card-day-pill {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

html.theme-dark .exec-activity-card {
  background: #1e2d45;
  border-color: rgba(100, 130, 180, 0.25);
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}

html.theme-dark .exec-activity-card:hover {
  border-color: rgba(100, 140, 200, 0.5);
  box-shadow: 0 3px 10px rgba(0,0,0,0.45);
}

html.theme-dark .exec-activity-card.exec-row-chat-active {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

html.theme-dark .exec-activity-card.is-done {
  background: rgba(22, 101, 52, 0.2);
  border-color: rgba(74, 222, 128, 0.2);
}

html.theme-dark .exec-card-overlay {
  background: rgba(10, 20, 40, 0.55);
}

html.theme-dark .exec-card-overlay-label {
  background: rgba(20, 35, 60, 0.92);
  border-color: rgba(100, 130, 180, 0.35);
  color: #94a3b8;
}

html.theme-dark .exec-card-header {
  border-bottom-color: rgba(100, 130, 180, 0.15);
}

html.theme-dark .exec-card-badge.is-success   { background: rgba(22, 101, 52, 0.4);  color: #86efac; }
html.theme-dark .exec-card-badge.is-warning   { background: rgba(120, 80, 0, 0.35);  color: #fcd34d; }
html.theme-dark .exec-card-badge.is-danger    { background: rgba(127, 29, 29, 0.4);  color: #fca5a5; }
html.theme-dark .exec-card-badge.is-info      { background: rgba(30, 64, 175, 0.35); color: #93c5fd; }
html.theme-dark .exec-card-badge.is-secondary { background: rgba(30, 41, 59, 0.8);   color: #94a3b8; }

html.theme-dark .exec-card-client {
  color: #e2e8f0;
}

html.theme-dark .exec-card-equipo {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(100, 130, 180, 0.2);
  color: #94a3b8;
}

html.theme-dark .exec-card-meta-item {
  color: #94a3b8;
}

html.theme-dark .exec-card-footer {
  border-top-color: rgba(100, 130, 180, 0.15);
}

html.theme-dark .exec-card-total-real {
  color: #f1f5f9;
}

html.theme-dark .exec-card-delta.is-over  { color: #fca5a5; background: rgba(127, 29, 29, 0.3);  }
html.theme-dark .exec-card-delta.is-under { color: #86efac; background: rgba(22, 101, 52, 0.3);  }
html.theme-dark .exec-card-delta.is-even  { color: #94a3b8; background: rgba(30, 41, 59, 0.6);   }

html.theme-dark .exec-card-plan-label {
  color: #64748b;
}

html.theme-dark .exec-card-label {
  color: #94a3b8;
}

/* ── btn-view-mode is-card ──────────────────────────────────────────────── */
.btn.btn-view-mode.is-card {
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  color: #fff;
  border-color: transparent;
}

.btn.btn-view-mode.is-card:hover {
  background: linear-gradient(135deg, #6d28d9 0%, #4338ca 100%);
  color: #fff;
}

html.theme-dark .btn.btn-view-mode.is-card {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.85) 0%, rgba(79, 70, 229, 0.85) 100%);
  border-color: rgba(167, 139, 250, 0.4);
  color: #e9d5ff;
}

html.theme-dark .btn.btn-view-mode.is-card:hover {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.95) 0%, rgba(79, 70, 229, 0.95) 100%);
  border-color: rgba(167, 139, 250, 0.65);
  color: #f3e8ff;
}

/* ── Mobile tweaks for card view ────────────────────────────────────────── */
@media (max-width: 480px) {
  .exec-card-day-body {
    grid-template-columns: 1fr;
  }

  .exec-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

html.theme-dark .exec-chat-fab {
  border-color: rgba(82, 110, 157, 0.9);
  background:
    radial-gradient(circle at top left, rgba(32, 49, 82, 0.96), rgba(15, 26, 48, 0.96) 54%, rgba(9, 16, 30, 0.98)),
    linear-gradient(135deg, rgba(20, 31, 55, 0.98), rgba(12, 21, 39, 0.98));
  color: #e3edff;
  box-shadow: 0 20px 38px rgba(2, 9, 25, 0.46);
}

html.theme-dark .exec-chat-fab:hover {
  border-color: rgba(115, 145, 202, 0.96);
}

html.theme-dark .route-suggestion-fab-icon {
  background: linear-gradient(135deg, #2b69ff, #5ac0ff);
  color: #eef6ff;
}

html.theme-dark .route-suggestion-card {
  border-color: rgba(62, 84, 125, 0.72);
  background: linear-gradient(180deg, rgba(12, 24, 42, 0.96), rgba(9, 18, 33, 0.94));
}

html.theme-dark .route-suggestion-date,
html.theme-dark .route-suggestion-order li {
  color: #e5edff;
}

html.theme-dark .route-suggestion-metrics,
html.theme-dark .route-suggestion-note,
html.theme-dark .route-suggestion-order li span,
html.theme-dark .route-suggestion-list-title {
  color: #9eb2d7;
}

html.theme-dark .route-suggestion-badge.is-positive {
  background: rgba(39, 174, 96, 0.16);
  color: #7ce0b0;
}

html.theme-dark .route-suggestion-badge.is-neutral {
  background: rgba(54, 116, 255, 0.18);
  color: #a8c5ff;
}

html.theme-dark .exec-chat-fab-aura {
  border-color: rgba(178, 204, 255, 0.18);
  box-shadow:
    0 8px 18px rgba(3, 8, 20, 0.42),
    inset -4px -6px 10px rgba(118, 157, 233, 0.08),
    inset 5px 6px 12px rgba(255, 255, 255, 0.06);
}

html.theme-dark .exec-chat-fab-aura::before {
  background:
    conic-gradient(from 0deg,
      rgba(47, 98, 255, 0) 0deg,
      rgba(111, 152, 255, 0.34) 80deg,
      rgba(250, 204, 21, 0.34) 145deg,
      rgba(255, 255, 255, 0.08) 215deg,
      rgba(47, 98, 255, 0) 360deg);
  opacity: .92;
}

html.theme-dark .exec-chat-fab-aura::after {
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0) 56%),
    radial-gradient(circle at 72% 68%, rgba(111, 152, 255, 0.22), rgba(111, 152, 255, 0) 58%);
}

html.theme-dark .exec-chat-fab-aura-blob {
  background:
    radial-gradient(circle at 28% 24%, rgba(145, 181, 255, 0.26), rgba(94, 123, 184, 0.12) 36%, rgba(15, 24, 41, 0.08) 62%),
    linear-gradient(135deg, rgba(33, 47, 78, 0.98), rgba(17, 25, 42, 0.96));
}

html.theme-dark .exec-chat-fab-aura-core {
  color: #e6eeff;
  text-shadow: none;
}

html.theme-dark .exec-chat-fab-aura-wire {
  background: linear-gradient(90deg, rgba(152, 177, 228, 0.15), rgba(110, 151, 234, 0.54), rgba(250, 204, 21, 0.44));
}

html.theme-dark .exec-chat-shell {
  border-color: rgba(59, 87, 134, 0.86);
  background:
    radial-gradient(circle at top right, rgba(87, 120, 199, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(10, 21, 41, 0.98), rgba(7, 15, 29, 0.98));
  box-shadow: 0 28px 58px rgba(2, 9, 25, 0.68);
}

html.theme-dark .exec-chat-header,
html.theme-dark .exec-chat-composer {
  border-color: rgba(57, 83, 126, 0.84);
  background: linear-gradient(180deg, rgba(11, 24, 46, 0.96), rgba(8, 18, 35, 0.94));
}

html.theme-dark .exec-chat-voice-toggle[aria-pressed="true"] {
  color: #d6e4ff;
  border-color: rgba(104, 138, 207, 0.52);
  background: rgba(88, 123, 198, 0.2);
}

html.theme-dark .exec-chat-kicker,
html.theme-dark .exec-chat-meta,
html.theme-dark .exec-chat-context-sub,
html.theme-dark .exec-chat-context-route,
html.theme-dark .exec-chat-card-copy,
html.theme-dark .exec-chat-empty,
html.theme-dark .exec-chat-activity-option span,
html.theme-dark .exec-chat-metric-pill span,
html.theme-dark .exec-chat-kv span,
html.theme-dark .exec-chat-field span,
html.theme-dark .exec-chat-summary-note,
html.theme-dark .exec-chat-summary-chip,
html.theme-dark .exec-chat-tray-sheet-title,
html.theme-dark .exec-chat-tray-btn {
  color: #9fb9e2;
}

html.theme-dark .exec-chat-title,
html.theme-dark .exec-chat-context-title,
html.theme-dark .exec-chat-card-title,
html.theme-dark .exec-chat-activity-option,
html.theme-dark .exec-chat-metric-pill strong,
html.theme-dark .exec-chat-kv strong,
html.theme-dark .exec-chat-total-row,
html.theme-dark .exec-chat-summary-total {
  color: #e3eeff;
}

html.theme-dark .exec-chat-context-card,
html.theme-dark .exec-chat-card,
html.theme-dark .exec-chat-bubble.is-assistant,
html.theme-dark .exec-chat-activity-option,
html.theme-dark .exec-chat-metric-pill,
html.theme-dark .exec-chat-kv,
html.theme-dark .exec-chat-summary-chip,
html.theme-dark .exec-chat-tray-btn,
html.theme-dark .exec-chat-tray-sheet {
  border-color: rgba(58, 86, 131, 0.84);
  background: rgba(10, 22, 43, 0.92);
  box-shadow: 0 16px 30px rgba(3, 10, 28, 0.4);
}

html.theme-dark .exec-chat-summary-chip.is-cost {
  background: rgba(34, 73, 138, 0.32);
}

html.theme-dark .exec-chat-tray-btn.is-active {
  color: #d6e4ff;
  border-color: rgba(104, 138, 207, 0.52);
  background: rgba(88, 123, 198, 0.2);
}

html.theme-dark .exec-chat-summary-alert {
  color: #ffd07c;
  border-color: rgba(193, 139, 37, 0.42);
  background: rgba(84, 58, 19, 0.42);
}

html.theme-dark .exec-chat-media-option {
  color: #d7e5ff;
  border-color: rgba(58, 86, 131, 0.84);
  background: rgba(10, 22, 43, 0.92);
  box-shadow: 0 16px 30px rgba(3, 10, 28, 0.4);
}

html.theme-dark .exec-chat-media-option i {
  color: #8fb4ff;
}

html.theme-dark .exec-chat-bubble.is-assistant {
  color: #d9e8ff;
}

html.theme-dark .exec-chat-bubble.is-assistant.is-success {
  background: rgba(12, 58, 43, 0.92);
  border-color: rgba(48, 160, 118, 0.38);
}

html.theme-dark .exec-chat-bubble.is-assistant.is-warning {
  background: rgba(76, 53, 14, 0.9);
  border-color: rgba(222, 164, 54, 0.34);
}

html.theme-dark .exec-chat-bubble.is-assistant.is-danger {
  background: rgba(70, 23, 34, 0.92);
  border-color: rgba(204, 94, 114, 0.34);
}

html.theme-dark .exec-chat-total-row {
  border-top-color: rgba(66, 98, 149, 0.88);
}

html.theme-dark #execChatMicBtn.is-listening {
  color: #d3f8e6;
  border-color: rgba(46, 168, 125, 0.38);
  background: rgba(16, 103, 75, 0.34);
}

html.theme-dark #execRouteMeta .exec-route-chip {
  border-color: rgba(85, 117, 168, .8);
  background: rgba(34, 63, 114, .38);
  color: #d8e8ff;
}

html.theme-dark #execRouteMeta .exec-route-chip.is-from {
  border-color: rgba(45, 138, 103, .7);
  background: rgba(19, 102, 78, .34);
  color: #c8f1e3;
}

html.theme-dark #execRouteMeta .exec-route-chip.is-to {
  border-color: rgba(170, 109, 61, .72);
  background: rgba(123, 75, 37, .34);
  color: #ffdcbf;
}

html:not(.theme-dark) .exec-activities-state {
  border-color: rgba(86, 118, 169, .44);
  background: linear-gradient(180deg, #10274d, #0c1d3a);
  color: #e7f0ff;
  box-shadow: inset 0 1px 0 rgba(180, 205, 245, .12), 0 8px 16px rgba(14, 34, 71, .18);
}

html:not(.theme-dark) .exec-activities-state--empty {
  border-color: rgba(90, 130, 193, .5);
  color: #eaf2ff;
}

html:not(.theme-dark) .exec-activities-state--error {
  border-color: rgba(191, 98, 98, .56);
  color: #ffe0e0;
  background: linear-gradient(180deg, #4a1d27, #31151c);
}

.evidence-modal-body {
  min-height: 58vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f7fd;
  overflow: hidden;
}

.evidence-preview-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 14px 28px rgba(10, 23, 49, .14);
  transition: transform .18s ease;
  will-change: transform;
  user-select: none;
}

.evidence-preview-frame {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(129, 154, 194, .38);
  border-radius: 10px;
  background: #fff;
}

/* Global modal stack safety: keep modal above backdrop in all pages. */
body.modal-open .modal.show {
  z-index: 2106;
}

body.modal-open .modal-backdrop.show {
  z-index: 2100;
}

/* Keep evidence modal above any custom fixed layers and avoid blocked clicks. */
#evidencePreviewModal {
  z-index: 2105;
}

body.evidence-modal-open .modal-backdrop.show {
  z-index: 2100;
}

/* Keep approval modal above custom overlays/backdrops to avoid blocked interaction. */
#approvalModal {
  z-index: 2105;
}

body.approval-modal-open .modal-backdrop.show {
  z-index: 2100;
}

#liquidationReviewModal {
  z-index: 2106;
}

#liquidationReviewModal .modal-dialog {
  --bs-modal-width: min(1480px, calc(100vw - 24px));
}

body.liquidation-review-modal-open .modal-backdrop.show {
  z-index: 2101;
}

#liquidationReviewModal .modal-content {
  border: 1px solid rgba(189, 205, 231, 0.82);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 22px 44px rgba(13, 38, 88, 0.18);
  transform: translateZ(0);
}

#liquidationReviewModal .modal-header {
  border-bottom: 1px solid rgba(195, 212, 237, 0.92);
  background: linear-gradient(180deg, #f7faff, #f1f6ff);
}

#liquidationReviewModal .modal-body {
  background: linear-gradient(180deg, #fbfdff, #f5f9ff);
}

.liquid-review-head {
  display: grid;
  gap: 10px;
}

.liquid-review-metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.liquid-review-metric-card {
  border: 1px solid rgba(193, 210, 236, 0.94);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  padding: 10px 12px;
  box-shadow: 0 8px 18px rgba(17, 52, 111, 0.08);
}

.liquid-review-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.liquid-review-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid rgba(179, 201, 232, 0.92);
  background: rgba(255, 255, 255, 0.9);
  padding: 5px 10px;
  font-size: .84rem;
}

.liquid-evidence-toolbar {
  border: 1px solid rgba(194, 211, 238, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  padding: 10px 12px;
}

.liquid-evidence-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.liquid-evidence-filter-btn {
  border-radius: 999px;
  transition: transform .16s ease, box-shadow .16s ease;
}

.liquid-evidence-filter-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(22, 57, 116, 0.15);
}

.liquid-evidence-filter-btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, #2f62ff, #2457f0);
  border-color: #2f62ff;
}

.liquid-evidence-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(45, 89, 188, 0.12);
  font-size: .76rem;
  font-weight: 700;
}

.liquid-evidence-filter-btn.is-active .liquid-evidence-count {
  background: rgba(255, 255, 255, 0.22);
}

.liquid-day-card {
  border: 1px solid rgba(194, 211, 238, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 22px rgba(20, 49, 99, 0.08);
  padding: 10px 12px;
}

.liquid-day-table-wrap {
  border-radius: 10px;
}

.liquid-day-table thead th {
  white-space: nowrap;
  font-size: .72rem;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.liquid-day-table tbody td {
  vertical-align: middle;
  padding-top: .32rem;
  padding-bottom: .32rem;
}

.liquid-day-table .form-control,
.liquid-day-table .form-select {
  min-width: 94px;
}

.liquid-day-table .liquid-day-date-cell {
  min-width: 72px;
}

.liquid-day-table .liquid-day-date {
  display: inline-block;
  font-size: .9rem;
  letter-spacing: .01em;
  line-height: 1.05;
}

.liquid-day-table .liquid-day-date-cell .small {
  margin-top: 2px;
  font-size: .73rem;
}

.liquid-day-table .liquid-day-note-input {
  min-width: 120px;
}

.liquid-day-table th:last-child,
.liquid-day-table td:last-child {
  width: 68px;
}

.liquid-day-table .liquid-day-remove {
  min-width: 32px;
  line-height: 1;
}

.liquid-day-summary {
  border-top: 1px solid rgba(186, 205, 234, 0.9);
  padding-top: 8px;
}

.liquid-rubro-panels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.liquid-rubro-panel {
  border: 1px solid rgba(192, 208, 233, 0.94);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 9px 20px rgba(20, 49, 99, 0.08);
  padding: 10px 12px;
}

.liquid-rubro-panel-title {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #486189;
  font-weight: 700;
  margin-bottom: 7px;
}

.liquid-rubro-panel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: .86rem;
  margin-top: 6px;
}

.liquid-rubro-panel-row span {
  color: #5f7292;
}

.liquid-rubro-panel-row strong {
  text-align: right;
}

.liquid-rubro-panel-row-input .form-control {
  max-width: 126px;
}

.liquid-rubro-panel-total {
  margin-top: 9px;
  padding-top: 7px;
  border-top: 1px solid rgba(187, 205, 233, 0.9);
  font-weight: 700;
}

@media (max-width: 1199.98px) {
  .liquid-rubro-panels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .liquid-rubro-panels {
    grid-template-columns: 1fr;
  }
}

#liquidationReviewModal .table-responsive {
  scroll-behavior: smooth;
}

#liquidEvidenceViewerModal {
  z-index: 2106;
}

#liquidEvidenceViewerModal .modal-dialog {
  --bs-modal-width: calc(100vw - 28px);
  max-width: calc(100vw - 28px);
}

body.invoice-viewer-modal-open .modal-backdrop.show {
  z-index: 2101;
}

.liquid-evidence-viewer-content {
  position: relative;
  width: min(1080px, calc(100vw - 56px));
  height: min(820px, calc(100vh - 36px));
  min-width: 320px;
  min-height: 360px;
  max-width: calc(100vw - 20px);
  max-height: calc(100vh - 20px);
  margin: 0 auto;
  overflow: hidden;
}

.liquid-evidence-viewer-modal-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.liquid-evidence-viewer-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.liquid-evidence-viewer-context-wrap {
  flex: 1 1 220px;
  min-width: 0;
}

.liquid-evidence-viewer-tools {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.liquid-evidence-viewer-body {
  flex: 1 1 auto;
  min-height: 0;
  border: 1px solid rgba(176, 196, 228, 0.72);
  border-radius: 18px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.94), transparent 26%),
    radial-gradient(circle at 82% 16%, rgba(152, 196, 255, 0.3), transparent 34%),
    radial-gradient(circle at 50% 88%, rgba(205, 230, 255, 0.32), transparent 40%),
    linear-gradient(180deg, rgba(244, 248, 255, 0.98), rgba(231, 239, 251, 0.98));
}

.liquid-evidence-viewer-counter {
  font-size: .82rem;
  font-weight: 700;
  color: #1f3f77;
  border: 1px solid rgba(174, 198, 234, 0.85);
  border-radius: 999px;
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.92);
}

.liquid-evidence-viewer-image {
  max-width: none;
  max-height: none;
}

.liquid-evidence-viewer-frame {
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: none;
  border-radius: 14px;
  background: #fff;
}

.liquid-evidence-resize-handle {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 18px;
  height: 18px;
  border-right: 2px solid rgba(66, 101, 158, 0.72);
  border-bottom: 2px solid rgba(66, 101, 158, 0.72);
  border-bottom-right-radius: 5px;
  cursor: nwse-resize;
  opacity: .8;
}

.liquid-evidence-resize-handle::before,
.liquid-evidence-resize-handle::after {
  content: "";
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 8px;
  height: 1px;
  background: rgba(66, 101, 158, 0.72);
  transform: rotate(-45deg);
  transform-origin: right center;
}

.liquid-evidence-resize-handle::after {
  right: 5px;
  bottom: 5px;
}

@media (max-width: 767.98px) {
  .liquid-evidence-viewer-content {
    width: calc(100vw - 16px) !important;
    height: min(86vh, calc(100vh - 16px)) !important;
  }

  .liquid-evidence-viewer-tools {
    width: 100%;
    justify-content: flex-end;
  }

  .liquid-evidence-resize-handle {
    display: none;
  }
}

#liquidNewDayDate {
  max-width: 170px;
}

.liquid-suggest-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
}

.liquid-suggest-icon-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.liquid-suggest-icon-btn i {
  font-size: .95rem;
}

html.theme-dark #liquidationReviewModal .modal-content {
  border-color: rgba(56, 86, 136, 0.84);
  background: linear-gradient(180deg, rgba(11, 22, 43, 0.98), rgba(8, 17, 34, 0.98));
  box-shadow: 0 24px 46px rgba(2, 9, 25, 0.72);
}

html.theme-dark #liquidationReviewModal .modal-header {
  border-bottom-color: rgba(52, 79, 124, 0.82);
  background: linear-gradient(180deg, rgba(14, 28, 52, 0.96), rgba(10, 22, 42, 0.96));
}

html.theme-dark #liquidationReviewModal .modal-body {
  background: linear-gradient(180deg, rgba(8, 16, 31, 0.97), rgba(6, 13, 27, 0.97));
}

html.theme-dark .liquid-review-metric-card,
html.theme-dark .liquid-rubro-card,
html.theme-dark .liquid-rubro-panel {
  border-color: rgba(59, 88, 133, 0.86);
  background: rgba(11, 22, 43, 0.92);
  box-shadow: 0 16px 30px rgba(3, 10, 28, 0.46);
}

html.theme-dark .liquid-rubro-card-total,
html.theme-dark .liquid-rubro-panel-total {
  border-color: rgba(84, 125, 190, 0.82);
  background: linear-gradient(180deg, rgba(15, 31, 60, 0.96), rgba(10, 22, 44, 0.96));
}

html.theme-dark .liquid-rubro-card-title,
html.theme-dark .liquid-rubro-panel-title {
  color: #b8ccf3;
}

html.theme-dark .liquid-rubro-card-row span,
html.theme-dark .liquid-rubro-panel-row span {
  color: #a8bedf;
}

html.theme-dark .liquid-review-meta-chip {
  border-color: rgba(58, 87, 130, 0.86);
  background: rgba(13, 26, 49, 0.9);
}

html.theme-dark .liquid-evidence-toolbar {
  border-color: rgba(56, 84, 128, 0.84);
  background: rgba(10, 22, 43, 0.9);
}

html.theme-dark .liquid-day-card {
  border-color: rgba(56, 84, 128, 0.84);
  background: rgba(10, 22, 43, 0.9);
  box-shadow: 0 16px 30px rgba(3, 10, 28, 0.44);
}

html.theme-dark .liquid-day-summary {
  border-top-color: rgba(56, 84, 128, 0.84);
}

html.theme-dark .liquid-day-table .liquid-day-date {
  color: #e7f0ff;
}

html.theme-dark .liquid-evidence-filter-btn {
  color: #dbe8ff;
  border-color: rgba(76, 109, 163, 0.82);
  background: rgba(12, 28, 53, 0.84);
}

html.theme-dark .liquid-evidence-filter-btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, #3f78ff, #2d63f1);
  border-color: #3f78ff;
}

html.theme-dark .liquid-evidence-count {
  background: rgba(77, 112, 177, 0.26);
}

html.theme-dark #liquidEvidenceViewerModal .modal-content {
  border: 1px solid rgba(56, 86, 136, 0.84);
  background: linear-gradient(180deg, rgba(11, 22, 43, 0.98), rgba(8, 17, 34, 0.98));
}

html.theme-dark #liquidEvidenceViewerModal .modal-header,
html.theme-dark #liquidEvidenceViewerModal .modal-footer {
  border-color: rgba(52, 79, 124, 0.82);
  background: linear-gradient(180deg, rgba(14, 28, 52, 0.96), rgba(10, 22, 42, 0.96));
}

html.theme-dark #liquidEvidenceViewerModal .modal-body {
  background: linear-gradient(180deg, rgba(8, 16, 31, 0.97), rgba(6, 13, 27, 0.97));
}

html.theme-dark .liquid-evidence-viewer-counter {
  color: #d8e8ff;
  border-color: rgba(70, 102, 154, 0.86);
  background: rgba(10, 24, 47, 0.9);
}

html.theme-dark .liquid-evidence-viewer-body {
  border-color: rgba(56, 84, 128, 0.84);
  background:
    radial-gradient(circle at 18% 18%, rgba(25, 44, 76, 0.88), transparent 26%),
    radial-gradient(circle at 82% 16%, rgba(48, 93, 166, 0.22), transparent 34%),
    radial-gradient(circle at 50% 88%, rgba(32, 65, 116, 0.26), transparent 40%),
    linear-gradient(180deg, rgba(10, 22, 43, 0.96), rgba(7, 15, 31, 0.98));
}

html.theme-dark .liquid-evidence-viewer-frame {
  background: rgba(12, 24, 46, 0.94);
}

html.theme-dark .liquid-evidence-resize-handle {
  border-right-color: rgba(118, 171, 255, 0.84);
  border-bottom-color: rgba(118, 171, 255, 0.84);
}

html.theme-dark .liquid-evidence-resize-handle::before,
html.theme-dark .liquid-evidence-resize-handle::after {
  background: rgba(118, 171, 255, 0.84);
}

#userEditModal {
  z-index: 2106;
}

body.user-edit-modal-open .modal-backdrop.show {
  z-index: 2101;
}

html.theme-dark #evidencePreviewModal .modal-content {
  border: 1px solid rgba(53, 77, 115, .82);
  background: linear-gradient(180deg, rgba(8, 18, 35, .98), rgba(7, 15, 30, .98));
  color: #d7e6ff;
  box-shadow: 0 16px 36px rgba(2, 11, 30, .66);
}

html.theme-dark #evidencePreviewModal .modal-header,
html.theme-dark #evidencePreviewModal .modal-footer {
  border-color: rgba(45, 69, 104, .74);
  background: linear-gradient(180deg, rgba(10, 22, 42, .94), rgba(8, 18, 34, .94));
}

html.theme-dark .evidence-modal-body {
  background: linear-gradient(180deg, rgba(8, 16, 31, .96), rgba(6, 13, 26, .96));
}

html.theme-dark .evidence-preview-image {
  box-shadow: 0 18px 34px rgba(1, 8, 22, .72);
}

html.theme-dark .evidence-preview-frame {
  border-color: rgba(55, 83, 128, .8);
  background: rgba(8, 17, 33, .95);
}

/* Dark styling for execution modals (plan/ruta/adjuntos). */
html.theme-dark #planningRouteMapModal .modal-content,
html.theme-dark #execPlanModal .modal-content,
html.theme-dark #execRouteModal .modal-content,
html.theme-dark #execAttachmentsModal .modal-content,
html.theme-dark #planningExecutionModal .modal-content {
  border: 1px solid rgba(58, 86, 129, .82);
  background-color: rgba(8, 16, 31, .985) !important;
  background: linear-gradient(180deg, rgba(11, 20, 38, .985), rgba(7, 14, 27, .985)) !important;
  color: #deebff !important;
  box-shadow: 0 22px 48px rgba(2, 10, 28, .72);
}

html.theme-dark #planningRouteMapModal .modal-header,
html.theme-dark #execPlanModal .modal-header,
html.theme-dark #execPlanModal .modal-footer,
html.theme-dark #planningRouteMapModal .modal-footer,
html.theme-dark #execRouteModal .modal-header,
html.theme-dark #execRouteModal .modal-footer,
html.theme-dark #execAttachmentsModal .modal-header,
html.theme-dark #execAttachmentsModal .modal-footer,
html.theme-dark #planningExecutionModal .modal-header,
html.theme-dark #planningExecutionModal .modal-footer {
  border-color: rgba(45, 69, 104, .74);
  background-color: rgba(10, 20, 38, .92) !important;
  background: linear-gradient(180deg, rgba(13, 25, 47, .9), rgba(9, 19, 36, .92)) !important;
}

html.theme-dark #planningRouteMapModal .modal-body,
html.theme-dark #execPlanModal .modal-body,
html.theme-dark #execRouteModal .modal-body,
html.theme-dark #execAttachmentsModal .modal-body,
html.theme-dark #planningExecutionModal .modal-body {
  background-color: rgba(8, 17, 33, .97) !important;
  background: linear-gradient(180deg, rgba(8, 17, 33, .96), rgba(6, 13, 26, .97)) !important;
}

html.theme-dark #planningRouteMapModal .modal-title,
html.theme-dark #execPlanModal .modal-title,
html.theme-dark #execRouteModal .modal-title,
html.theme-dark #execAttachmentsModal .modal-title,
html.theme-dark #planningExecutionModal .modal-title {
  color: #f0f6ff;
}

html.theme-dark #planningRouteMapModal .text-muted,
html.theme-dark #execPlanModal .text-muted,
html.theme-dark #execRouteModal .text-muted,
html.theme-dark #execAttachmentsModal .text-muted,
html.theme-dark #planningExecutionModal .text-muted {
  color: #b4c7e7 !important;
}

.planning-exec-modal-panel {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  padding: 16px;
  box-shadow: var(--planning-shadow-soft);
}

.planning-exec-modal-kicker {
  margin-bottom: 10px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--planning-muted);
}

.planning-exec-modal-summary {
  display: grid;
  gap: 10px;
}

.planning-exec-modal-summary-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(203, 213, 225, 0.7);
  font-size: .9rem;
}

.planning-exec-modal-summary-item span:first-child {
  color: var(--planning-muted);
  font-weight: 600;
}

.planning-exec-modal-summary-item strong {
  color: var(--planning-title);
  text-align: right;
}

.planning-exec-modal-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.16);
}

.planning-exec-modal-total span {
  font-size: .85rem;
  font-weight: 700;
  color: var(--planning-muted);
}

.planning-exec-modal-total strong {
  font-size: 1.1rem;
  color: var(--planning-title);
}

html.theme-dark .planning-exec-modal-panel {
  background: rgba(12, 21, 38, 0.92);
  border-color: rgba(76, 98, 131, 0.44);
}

html.theme-dark .planning-exec-modal-summary-item {
  border-bottom-color: rgba(48, 69, 101, 0.8);
}

html.theme-dark .planning-exec-modal-summary-item strong,
html.theme-dark .planning-exec-modal-total strong {
  color: #edf4ff;
}

html.theme-dark .planning-exec-modal-total {
  background: rgba(43, 90, 177, 0.16);
  border-color: rgba(76, 132, 230, 0.26);
}

html.theme-dark #execPlanModal .table {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: transparent;
  --bs-table-active-bg: rgba(37, 62, 100, .16);
  --bs-table-hover-bg: rgba(37, 62, 100, .2);
  --bs-table-color: #e7f1ff;
  --bs-table-border-color: rgba(78, 109, 160, .62);
}

html.theme-dark #execPlanModal .table th,
html.theme-dark #execPlanModal .table td {
  border-color: rgba(78, 109, 160, .62);
  background: transparent;
}

html.theme-dark #execPlanModal .table th {
  color: #c9dbf8 !important;
  font-weight: 700;
}

html.theme-dark #execPlanModal .table td {
  color: #eef5ff;
  font-weight: 600;
}

html.theme-dark #execPlanModal .table tr:last-child th {
  color: #dbe7fd !important;
}

html.theme-dark #execPlanModal .table tr:last-child td {
  color: #ffffff;
}

html.theme-dark #planningRouteMapModal .btn-outline-secondary,
html.theme-dark #execPlanModal .btn-outline-secondary,
html.theme-dark #execRouteModal .btn-outline-secondary {
  color: #d8e5fb;
  border-color: rgba(97, 126, 176, .78);
  background: rgba(18, 35, 63, .52);
}

html.theme-dark #planningRouteMapModal .btn-outline-secondary:hover,
html.theme-dark #execPlanModal .btn-outline-secondary:hover,
html.theme-dark #execRouteModal .btn-outline-secondary:hover {
  color: #ffffff;
  border-color: rgba(122, 154, 208, .88);
  background: rgba(34, 60, 100, .66);
}

html.theme-dark #planningRouteMapModal .btn-close,
html.theme-dark #execPlanModal .btn-close,
html.theme-dark #execRouteModal .btn-close,
html.theme-dark #execAttachmentsModal .btn-close {
  filter: invert(1) grayscale(1) brightness(220%);
  opacity: .82;
}

html.theme-dark #planningRouteMapModal .btn-close:hover,
html.theme-dark #execPlanModal .btn-close:hover,
html.theme-dark #execRouteModal .btn-close:hover,
html.theme-dark #execAttachmentsModal .btn-close:hover {
  opacity: 1;
}

/* ── Day execution modal (.dex-*) ─────────────────────────── */
#dayExecModal {
  z-index: 2110;
}

body.day-exec-modal-open .modal-backdrop.show {
  z-index: 2105;
}

.dex-modal-content {
  border: 1px solid rgba(162, 182, 214, .74);
  border-radius: 18px;
  overflow: hidden;
}

.dex-modal-header {
  background: linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(243,248,255,.92) 100%);
  border-bottom: 1px solid rgba(191, 219, 254, .65);
  padding: 16px 20px;
}

.dex-modal-kicker {
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #6b87b8;
  margin-bottom: 2px;
}

.dex-modal-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: rgba(246, 250, 255, .7);
}

/* Per-activity card */
.dex-activity-card {
  border-radius: 14px;
  border: 1px solid rgba(174, 194, 224, .72);
  overflow: clip;
  background: #fff;
}

.dex-activity-card > .row {
  align-items: stretch;
}

.dex-activity-card + .dex-activity-card {
  /* gap already handled by flex on parent */
}

/* Left: planned panel */
.dex-plan-panel {
  padding: 16px 18px;
  background: linear-gradient(180deg, rgba(248, 252, 255, .96) 0%, rgba(239, 246, 255, .9) 100%);
  border-right: 1px solid rgba(191, 219, 254, .65);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dex-panel-kicker {
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #6b87b8;
  margin-bottom: 6px;
}

.dex-plan-time {
  font-size: .8rem;
  font-weight: 800;
  color: #3a5d90;
}

.dex-plan-client {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1b345a;
  line-height: 1.2;
}

.dex-plan-meta {
  font-size: .8rem;
  color: #4e6c96;
  margin-bottom: 10px;
}

.dex-plan-amounts {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 8px 0 6px;
}

.dex-amount-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0 6px;
}

.dex-amount-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .74rem;
  font-weight: 600;
  color: #2d4f83;
  background: rgba(218, 232, 255, .72);
  border: 1px solid rgba(150, 180, 230, .5);
  border-radius: 999px;
  padding: 2px 8px 2px 6px;
  white-space: nowrap;
}

.dex-amount-chip i {
  font-size: .68rem;
  color: #5580b8;
}

.dex-amount-chip-label {
  font-weight: 500;
  color: #4e6c96;
}

.dex-amount-chip strong {
  font-weight: 700;
}

.dex-plan-amount-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: .82rem;
  color: #4a6080;
}

.dex-plan-amount-row.is-real strong {
  color: #2563eb;
}

.dex-plan-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: .88rem;
  font-weight: 700;
  color: #1b345a;
  border-top: 1px solid rgba(174, 194, 224, .5);
  padding-top: 7px;
  margin-top: 6px;
}

.dex-status-pill {
  align-self: flex-start;
  margin-top: 10px;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #2d4f83;
  background: rgba(222, 234, 255, .92);
  border: 1px solid rgba(94, 130, 193, .52);
}

.dex-status-pill.is-executed {
  color: #225a43;
  background: rgba(214, 246, 233, .9);
  border-color: rgba(74, 164, 125, .52);
}

.dex-status-pill.is-cancelled, .dex-status-pill.is-relegated {
  color: #7e3018;
  background: rgba(255, 228, 220, .9);
  border-color: rgba(194, 104, 70, .56);
}

.dex-plan-obs {
  margin-top: 8px;
  font-size: 12px;
  color: var(--bs-secondary-color, #6c757d);
  font-style: italic;
  line-height: 1.5;
  border-left: 2px solid rgba(148, 163, 184, .45);
  padding-left: 8px;
}

/* Right: execution panel */
.dex-exec-panel {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.dex-exec-panel.is-closed {
  opacity: .75;
}

.dex-exec-closed-msg {
  font-size: .88rem;
  color: #6b7ea0;
  padding: 18px 0;
}

.dex-form-label {
  font-size: .7rem;
  font-weight: 700;
  color: #4e6c96;
  margin-bottom: 2px;
}

.dex-input {
  font-size: .8rem;
  padding-top: 3px;
  padding-bottom: 3px;
}

.dex-exec-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(174, 194, 224, .5);
}

.dex-exec-total {
  font-size: .88rem;
  color: #3a5d90;
}

.dex-exec-total strong {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1b345a;
  margin-left: 4px;
}

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

/* Responsive: stack panels on small screens */
@media (max-width: 767px) {
  .dex-plan-panel {
    border-right: none;
    border-bottom: 1px solid rgba(191, 219, 254, .65);
  }
}

/* Dark mode */
html.theme-dark .dex-modal-header {
  background: linear-gradient(180deg, rgba(14, 24, 44, .98) 0%, rgba(9, 18, 34, .96) 100%);
  border-color: rgba(56, 82, 130, .44);
}

html.theme-dark .dex-modal-kicker,
html.theme-dark .dex-panel-kicker {
  color: #7699c8;
}

html.theme-dark .dex-modal-body {
  background: rgba(8, 16, 30, .72);
}

html.theme-dark .dex-activity-card {
  border-color: rgba(56, 82, 130, .56);
  background: rgba(11, 22, 42, .96);
}

html.theme-dark .dex-plan-panel {
  background: linear-gradient(180deg, rgba(13, 22, 39, .94) 0%, rgba(9, 17, 31, .9) 100%);
  border-color: rgba(56, 82, 130, .44);
}

html.theme-dark .dex-plan-time { color: #6da0d8; }
html.theme-dark .dex-plan-client { color: #e8f2ff; }
html.theme-dark .dex-plan-meta { color: #8aa8d0; }
html.theme-dark .dex-plan-amount-row { color: #8daad4; }
html.theme-dark .dex-amount-chip {
  background: rgba(40, 64, 110, .55);
  border-color: rgba(70, 100, 160, .4);
  color: #aac4e8;
}
html.theme-dark .dex-amount-chip i { color: #7ea8d8; }
html.theme-dark .dex-amount-chip-label { color: #8daad4; }
html.theme-dark .dex-plan-total { color: #c8ddf8; border-color: rgba(56,82,130,.4); }
html.theme-dark .dex-exec-footer { border-color: rgba(56,82,130,.4); }
html.theme-dark .dex-exec-total { color: #8daad4; }
html.theme-dark .dex-exec-total strong { color: #ddeeff; }

html.theme-dark #dayExecModal .btn-close {
  filter: invert(1) grayscale(1) brightness(220%);
  opacity: .82;
}

/* ── Bulk plan table modal (.bpt-*) ──────────────────────── */
#bulkPlanModal {
  z-index: 2120;
}

body.bulk-plan-modal-open .modal-backdrop.show {
  z-index: 2115;
}

.bpt-modal-content {
  border-radius: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.bpt-modal-header {
  background: linear-gradient(180deg, #fff 0%, rgba(243, 248, 255, .96) 100%);
  border-bottom: 1px solid rgba(191, 219, 254, .65);
  padding: 12px 18px;
  flex-shrink: 0;
}

.bpt-kicker {
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #6b87b8;
  margin-bottom: 2px;
}

.bpt-modal-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #f4f8ff;
}

.bpt-table-wrap {
  flex: 1;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.bpt-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: .78rem;
}

.bpt-thead .bpt-th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #1e3a7c;
  color: #ddeeff;
  font-size: .66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 8px 8px;
  white-space: nowrap;
  border-right: 1px solid rgba(255, 255, 255, .1);
  user-select: none;
}

.bpt-thead .bpt-th:last-child {
  border-right: none;
}

.bpt-thead .bpt-th-num {
  text-align: right;
}

.bpt-row:nth-child(even) {
  background: rgba(237, 245, 255, .8);
}

.bpt-row:nth-child(odd) {
  background: #fff;
}

.bpt-row[data-status="saved"] {
  background: rgba(209, 250, 229, .55) !important;
}

.bpt-row[data-status="error"] {
  background: rgba(254, 226, 226, .55) !important;
}

.bpt-td {
  padding: 3px 4px;
  border-bottom: 1px solid rgba(200, 215, 240, .5);
  border-right: 1px solid rgba(200, 215, 240, .28);
  vertical-align: middle;
}

.bpt-td:last-child {
  border-right: none;
}

.bpt-td-status {
  white-space: nowrap;
}

.bpt-td-actions {
  white-space: nowrap;
  padding: 3px 6px;
}

/* Inputs inside cells */
.bpt-input {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 4px;
  padding: 3px 5px;
  font-size: .76rem;
  color: #1b345a;
  outline: none;
  transition: border-color .1s, background .1s;
  min-width: 0;
  line-height: 1.35;
}

.bpt-input:focus {
  border-color: #3b7af2;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(59, 122, 242, .14);
}

.bpt-input:disabled {
  color: #8096b4;
  background: transparent;
  cursor: default;
}

.bpt-input[type="date"] { min-width: 130px; }
.bpt-input[type="time"] { min-width: 80px; }
.bpt-select { min-width: 88px; cursor: pointer; }
.bpt-cliente { min-width: 140px; }
.bpt-equipo  { min-width: 100px; }
.bpt-prov    { min-width: 108px; }
.bpt-city    { min-width: 108px; }
.bpt-num     { min-width: 65px; text-align: right; }
.bpt-detalle { min-width: 140px; }

/* Status badges */
.bpt-estado {
  display: inline-block;
  font-size: .64rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}

.bpt-estado-unsaved {
  color: #92400e;
  background: rgba(253, 230, 138, .7);
  border: 1px solid rgba(217, 119, 6, .3);
}

.bpt-estado-saving {
  color: #1e40af;
  background: rgba(219, 234, 254, .8);
  border: 1px solid rgba(59, 130, 246, .3);
}

.bpt-estado-saved {
  color: #14532d;
  background: rgba(187, 247, 208, .8);
  border: 1px solid rgba(34, 197, 94, .3);
}

.bpt-estado-error {
  color: #7f1d1d;
  background: rgba(254, 202, 202, .8);
  border: 1px solid rgba(239, 68, 68, .3);
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Row action buttons */
.bpt-btn-save,
.bpt-btn-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 6px;
  font-size: .72rem;
  cursor: pointer;
  transition: background .12s, opacity .12s;
  vertical-align: middle;
}

.bpt-btn-save {
  background: rgba(22, 163, 74, .13);
  color: #15803d;
}

.bpt-btn-save:hover:not(:disabled) {
  background: rgba(22, 163, 74, .26);
}

.bpt-btn-save:disabled {
  opacity: .38;
  cursor: default;
}

.bpt-btn-delete {
  background: rgba(220, 38, 38, .1);
  color: #dc2626;
  margin-left: 4px;
}

.bpt-btn-delete:hover:not(:disabled) {
  background: rgba(220, 38, 38, .22);
}

.bpt-modal-footer {
  border-top: 1px solid rgba(191, 219, 254, .5);
  background: rgba(248, 250, 255, .95);
  flex-shrink: 0;
}

/* Dark mode */
html.theme-dark .bpt-modal-header {
  background: linear-gradient(180deg, rgba(14, 24, 44, .98) 0%, rgba(9, 18, 34, .96) 100%);
  border-color: rgba(56, 82, 130, .44);
}

html.theme-dark .bpt-modal-body,
html.theme-dark .bpt-table-wrap {
  background: rgba(6, 12, 24, .9);
}

html.theme-dark .bpt-thead .bpt-th {
  background: rgba(14, 26, 52, .98);
  color: #a8c4e6;
  border-right-color: rgba(255, 255, 255, .06);
}

html.theme-dark .bpt-row:nth-child(even) { background: rgba(16, 28, 52, .7) !important; }
html.theme-dark .bpt-row:nth-child(odd)  { background: rgba(8, 16, 34, .85) !important; }
html.theme-dark .bpt-row[data-status="saved"] { background: rgba(10, 44, 26, .8) !important; }
html.theme-dark .bpt-row[data-status="error"] { background: rgba(52, 16, 16, .8) !important; }

html.theme-dark .bpt-td {
  border-color: rgba(36, 56, 96, .45);
}

html.theme-dark .bpt-input {
  color: #d4e8ff;
}

html.theme-dark .bpt-input:focus {
  background: rgba(18, 32, 60, .85);
  border-color: #3b7af2;
}

html.theme-dark .bpt-modal-footer {
  background: rgba(6, 12, 24, .95);
  border-color: rgba(56, 82, 130, .4);
}

html.theme-dark #bulkPlanModal .btn-close {
  filter: invert(1) grayscale(1) brightness(220%);
  opacity: .82;
}


html.theme-dark #execAttachmentsModal #execModalActivityMeta,
html.theme-dark #execAttachmentsModal #execModalGpsText {
  color: #c3d6f4 !important;
}

html.theme-dark #execAttachmentsModal .exec-evidence-item {
  border-color: rgba(69, 101, 152, .86);
  background: linear-gradient(180deg, rgba(12, 24, 45, .92), rgba(9, 19, 36, .92));
}

html.theme-dark #execAttachmentsModal .exec-evidence-head {
  color: #d5e4fb;
}

html.theme-dark #execAttachmentsModal .exec-evidence-hint {
  color: #bdd1f2 !important;
}

html.theme-dark #execAttachmentsModal .exec-modal-evidence-input.form-control {
  background: linear-gradient(180deg, rgba(8, 18, 35, .95), rgba(6, 13, 27, .95));
  border-color: rgba(61, 94, 144, .86);
  color: #e6f0ff;
}

html.theme-dark #execAttachmentsModal .exec-modal-evidence-input.form-control::file-selector-button,
html.theme-dark #execAttachmentsModal .exec-modal-evidence-input.form-control::-webkit-file-upload-button {
  margin-right: .55rem;
  border: 1px solid rgba(85, 124, 185, .92);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(35, 67, 116, .96), rgba(24, 49, 91, .96));
  color: #f2f7ff;
  font-weight: 700;
  padding: .28rem .62rem;
  box-shadow: inset 0 1px 0 rgba(168, 195, 236, .2), 0 4px 10px rgba(3, 12, 31, .35);
}

html.theme-dark #execAttachmentsModal .btn-outline-primary {
  --bs-btn-color: #c2d8ff;
  --bs-btn-border-color: rgba(98, 132, 189, .88);
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: rgba(41, 78, 138, .84);
  --bs-btn-hover-border-color: rgba(128, 162, 222, .92);
  background: rgba(18, 37, 68, .52);
}

html.theme-dark #execAttachmentsModal .btn-outline-secondary {
  --bs-btn-color: #d7e5fb;
  --bs-btn-border-color: rgba(97, 126, 176, .78);
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: rgba(34, 60, 100, .66);
  --bs-btn-hover-border-color: rgba(122, 154, 208, .88);
  background: rgba(18, 35, 63, .52);
}

/* Readable default contrast for approval modals. */
#approvalModal .modal-content,
#planApprovalModal .modal-content {
  border: 1px solid rgba(186, 204, 232, .75);
  background: linear-gradient(180deg, rgba(252, 254, 255, .98), rgba(246, 250, 255, .97));
  color: #1f2e44;
  box-shadow: 0 18px 40px rgba(26, 48, 82, .26);
}

#approvalModal .modal-header,
#approvalModal .modal-footer,
#planApprovalModal .modal-header,
#planApprovalModal .modal-footer {
  border-color: rgba(199, 214, 238, .84);
  background: linear-gradient(180deg, rgba(247, 251, 255, .98), rgba(239, 246, 255, .98));
}

#approvalModal .modal-title,
#planApprovalModal .modal-title {
  color: #26364f;
  font-weight: 700;
}

#approvalModal .text-muted,
#planApprovalModal .text-muted {
  color: #4f6791 !important;
}

#approvalModal .form-label,
#planApprovalModal .form-label {
  color: #31496f;
  font-weight: 600;
}

#approvalModal .form-check-label,
#approvalModal .form-text,
#planApprovalModal .form-check-label,
#planApprovalModal .form-text {
  color: #425d87;
}

#approvalModal .form-control::placeholder,
#planApprovalModal .form-control::placeholder {
  color: #657da4;
}

/* Dark styling for approval dialogs (gastos + planificacion). */
html.theme-dark #approvalModal .modal-content,
html.theme-dark #planApprovalModal .modal-content {
  border: 1px solid rgba(58, 86, 129, .82);
  background: linear-gradient(180deg, rgba(11, 20, 38, .985), rgba(7, 14, 27, .985)) !important;
  color: #dce8ff !important;
  box-shadow: 0 22px 48px rgba(2, 10, 28, .72);
}

html.theme-dark #approvalModal .modal-header,
html.theme-dark #approvalModal .modal-footer,
html.theme-dark #planApprovalModal .modal-header,
html.theme-dark #planApprovalModal .modal-footer {
  border-color: rgba(45, 69, 104, .74);
  background: linear-gradient(180deg, rgba(13, 25, 47, .9), rgba(9, 19, 36, .92));
}

html.theme-dark #approvalModal .modal-body,
html.theme-dark #planApprovalModal .modal-body {
  background: linear-gradient(180deg, rgba(8, 17, 33, .96), rgba(6, 13, 26, .97)) !important;
}

html.theme-dark #approvalModal .modal-title,
html.theme-dark #planApprovalModal .modal-title {
  color: #f0f6ff !important;
}

html.theme-dark #approvalModal .text-muted,
html.theme-dark #planApprovalModal .text-muted {
  color: #b4c7e7 !important;
}

html.theme-dark #approvalModal .form-label,
html.theme-dark #planApprovalModal .form-label {
  color: #d4e2f8 !important;
  font-weight: 600;
}

html.theme-dark #approvalModal .form-check-label,
html.theme-dark #approvalModal .form-text,
html.theme-dark #planApprovalModal .form-check-label,
html.theme-dark #planApprovalModal .form-text {
  color: #c0d1ec;
}

html.theme-dark #approvalModal .form-control::placeholder,
html.theme-dark #planApprovalModal .form-control::placeholder {
  color: #99add1;
}

html.theme-dark #approvalModal .alert.alert-info,
html.theme-dark #planApprovalModal .alert.alert-info {
  border-color: rgba(64, 97, 145, .65);
  background: linear-gradient(180deg, rgba(14, 29, 54, .9), rgba(10, 21, 41, .9));
  color: #cfe0ff;
}

html.theme-dark #approvalModal .alert.alert-danger,
html.theme-dark #planApprovalModal .alert.alert-danger {
  border-color: rgba(132, 68, 68, .68);
  background: linear-gradient(180deg, rgba(59, 25, 30, .86), rgba(44, 19, 23, .88));
  color: #ffd9db;
}

html.theme-dark #approvalModal .btn-close,
html.theme-dark #planApprovalModal .btn-close {
  filter: invert(1) grayscale(1) brightness(220%);
  opacity: .82;
}

html.theme-dark #approvalModal .btn-close:hover,
html.theme-dark #planApprovalModal .btn-close:hover {
  opacity: 1;
}

html.theme-dark #approvalModal .btn-outline-secondary,
html.theme-dark #planApprovalModal .btn-outline-secondary {
  color: #d8e7ff;
  border-color: rgba(93, 121, 166, .72);
  background: linear-gradient(180deg, rgba(10, 21, 40, .62), rgba(8, 16, 31, .62));
}

html.theme-dark #approvalModal .btn-outline-secondary:hover,
html.theme-dark #planApprovalModal .btn-outline-secondary:hover {
  color: #f0f6ff;
  border-color: rgba(117, 148, 196, .9);
  background: linear-gradient(180deg, rgba(13, 27, 51, .78), rgba(10, 20, 39, .78));
}

html.theme-dark #approvalModal .btn-primary,
html.theme-dark #planApprovalModal .btn-primary {
  color: #f7fbff;
}

.pipeline-switch {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.gastos-side-panel {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.gastos-top-cards-pane {
  margin-top: 10px;
}

.gastos-real-bottom-cards {
  margin-top: 14px;
}

.gastos-real-bottom-cards .row>[class*="col-"] {
  display: flex;
}

.comparativo-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .5rem;
}

.comparativo-cards-grid .summary-pill.summary-pill-hero {
  min-height: 110px;
}

.comparativo-bottom-cards {
  margin-top: 16px;
}

#topCardsComparativo .summary-pill-note {
  white-space: normal;
  line-height: 1.24;
}

.gastos-top-cards-pane .col-6 {
  display: flex;
}

.gastos-top-cards-pane .metric-card,
.gastos-top-cards-pane .summary-pill {
  width: 100%;
  min-height: 86px;
}

.gastos-top-cards-pane .metric-card {
  padding: 10px 11px;
}

.gastos-top-cards-pane .metric-card .k {
  font-size: .68rem;
  letter-spacing: .06em;
}

.gastos-top-cards-pane .metric-card .v {
  margin-top: 4px;
  font-size: clamp(1.05rem, 1.9vmin, 1.35rem);
}

.gastos-top-cards-pane .metric-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.gastos-top-cards-pane .summary-pill {
  padding: .6rem .7rem;
}

.gastos-top-cards-pane .summary-pill .k {
  font-size: .72rem;
}

.gastos-top-cards-pane .summary-pill .v {
  font-size: clamp(1.1rem, 2.1vmin, 1.45rem);
  margin-top: .2rem;
}

.btn-pipeline {
  border: 1px solid var(--btn-pipeline-border);
  background: var(--btn-pipeline-bg);
  color: var(--btn-pipeline-text);
  border-radius: 999px;
  padding: .35rem .9rem;
  font-size: .84rem;
  font-weight: 700;
}

.btn-pipeline:hover {
  border-color: var(--btn-pipeline-border-hover);
  color: var(--btn-pipeline-text-hover);
  background: var(--btn-pipeline-bg-hover);
}

.btn-pipeline.active {
  color: #fff;
  border-color: #0d6efd;
  background: #0d6efd;
  box-shadow: 0 6px 14px rgba(13, 110, 253, .22);
}

.btn.btn-view-mode {
  border-radius: 999px;
  border: 1px solid #7fb6ff;
  background: linear-gradient(180deg, #f8fbff 0%, #eaf3ff 100%);
  color: #1f63c6;
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: 0;
  padding: .28rem .9rem;
  line-height: 1.2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85);
  transition: transform .12s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease, color .18s ease, filter .18s ease;
}

.btn.btn-view-mode:hover {
  border-color: #66a2ef;
  background: linear-gradient(180deg, #f3f9ff 0%, #dfedff 100%);
  color: #1b57aa;
  transform: translateY(-1px);
  box-shadow: 0 7px 14px rgba(37, 87, 173, .16);
}

.btn.btn-view-mode:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 .2rem rgba(23, 121, 251, .26), 0 8px 14px rgba(34, 78, 156, .14);
}

.btn.btn-view-mode.is-back {
  color: #fff;
  border-color: #1576ef;
  background: linear-gradient(180deg, #2f93ff 0%, #1b7ff4 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 8px 16px rgba(18, 103, 215, .28);
}

.btn.btn-view-mode.is-back:hover {
  border-color: #0f6de0;
  color: #fff;
  background: linear-gradient(180deg, #42a0ff 0%, #2288fa 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), 0 10px 18px rgba(17, 96, 203, .32);
  filter: saturate(1.03);
}

.bank-order-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(96, 124, 173, .45);
  background: rgba(31, 64, 122, .08);
  color: #2b4f8c;
  border-radius: 999px;
  padding: .15rem .55rem;
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.planned-week-total-row td {
  background: linear-gradient(180deg, rgba(236, 244, 255, .95), rgba(227, 238, 255, .92));
  border-top: 2px solid rgba(113, 145, 195, .56);
}

.btn-approve {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .18rem;
  min-width: 96px;
  border-radius: 10px;
  border-width: 1px;
  font-weight: 700;
  letter-spacing: .01em;
  box-shadow: 0 4px 10px rgba(15, 23, 42, .12);
  transition: transform .12s ease, box-shadow .18s ease, filter .18s ease;
}

.btn-approve.btn-sm {
  padding: .32rem .62rem;
  font-size: .78rem;
}

.btn-approve:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 .2rem rgba(49, 94, 196, .24), 0 4px 10px rgba(15, 23, 42, .15);
}

.btn-approve:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(15, 23, 42, .16);
  filter: saturate(1.04);
}

.btn-approve:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(15, 23, 42, .14);
}

.btn-approve.btn-outline-primary {
  color: #ffffff;
  border-color: #2f64c8;
  background: linear-gradient(180deg, #3d7bf0 0%, #2f66cf 100%);
}

.btn-approve.btn-outline-primary:hover {
  color: #ffffff;
  border-color: #2a59b4;
  background: linear-gradient(180deg, #4a87f3 0%, #346fd7 100%);
}

.btn-approve.btn-outline-warning {
  color: #4a3405;
  border-color: #c08a1f;
  background: linear-gradient(180deg, #ffd36a 0%, #f2bd4d 100%);
}

.btn-approve.btn-outline-warning:hover {
  color: #3f2d04;
  border-color: #ae7a15;
  background: linear-gradient(180deg, #ffdc81 0%, #f5c863 100%);
}

#liquidationTableBody td {
  white-space: nowrap;
}

#liquidationTableBody .liquidation-date-cell,
#liquidationTableBody .liquidation-report-cell,
#liquidationTableBody .liquidation-detail-cell,
#liquidationTableBody .liquidation-status-cell {
  white-space: normal;
}

.liquidation-table-wrap {
  overflow-x: auto;
}

.liquidation-table-wrap .table thead th {
  vertical-align: bottom;
}

.liquidation-date-head,
.liquidation-date-cell,
.liquidation-approval-head {
  min-width: 8.2rem;
}

.liquidation-report-head,
.liquidation-report-cell {
  min-width: 11.5rem;
}

.liquidation-detail-head,
.liquidation-detail-cell {
  min-width: 15rem;
}

.liquidation-actions-head,
.liquidation-actions-cell {
  min-width: 16.25rem;
}

.liquidation-report-cell {
  line-height: 1.08;
}

.liquidation-report-main {
  display: block;
  font-size: .94rem;
  line-height: 1.08;
}

.liquidation-report-range {
  margin-top: .18rem;
  font-size: .68rem;
  line-height: 1.12;
  color: var(--muted-color);
}

.liquidation-detail-cell,
.liquidation-status-cell {
  line-height: 1.15;
}

.liquidation-actions-cell .btn {
  padding: .3rem .58rem;
  font-size: .74rem;
  border-radius: 10px;
}

.liquidation-actions-cell .btn+.btn {
  margin-left: .28rem !important;
}

.metric-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 14px;
  padding: 12px 14px;
  color: #fff;
  min-height: 98px;
  box-shadow: 0 8px 20px rgba(2, 8, 23, .12);
}

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.metric-card .k {
  font-size: .76rem;
  color: rgba(246, 250, 255, .92);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
}

.metric-card .v {
  font-size: clamp(1.3rem, 2.5vmin, 1.85rem);
  font-weight: 800;
  line-height: 1.05;
  margin-top: 6px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .38);
}

.metric-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, .22);
  background: linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .06));
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .26);
  transition: transform .2s ease, filter .2s ease;
}

.metric-icon i {
  font-size: 1rem;
}

.grad-gas {
  background: linear-gradient(145deg, #233f66, #13253f);
}

.grad-pea {
  background: linear-gradient(145deg, #213f58, #122837);
}

.grad-ali {
  background: linear-gradient(145deg, #42311f, #261b11);
}

.grad-hos {
  background: linear-gradient(145deg, #1e4034, #11271f);
}

.grad-imp {
  background: linear-gradient(145deg, #47262a, #281418);
}

.grad-tot {
  background: linear-gradient(145deg, #2b3155, #161a33);
}

html:not(.theme-dark) #tab-reales .metric-card,
html:not(.theme-dark) #topCardsReales .metric-card {
  border: 1px solid rgba(var(--metric-accent-rgb), .28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(var(--metric-accent-rgb), .10));
  box-shadow: 0 10px 18px rgba(15, 23, 42, .08);
}

html:not(.theme-dark) #tab-reales .metric-card:hover,
html:not(.theme-dark) #topCardsReales .metric-card:hover {
  border-color: rgba(var(--metric-accent-rgb), .42);
  box-shadow: 0 12px 22px rgba(15, 23, 42, .11);
  transform: translateY(-1px);
}

html:not(.theme-dark) #tab-reales .metric-card .k,
html:not(.theme-dark) #topCardsReales .metric-card .k {
  color: #64748b;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  text-shadow: none;
}

html:not(.theme-dark) #tab-reales .metric-card .v,
html:not(.theme-dark) #topCardsReales .metric-card .v {
  color: #0f172a;
  -webkit-text-fill-color: #0f172a;
  text-shadow: none;
}

html:not(.theme-dark) #tab-reales .metric-card::before,
html:not(.theme-dark) #topCardsReales .metric-card::before {
  opacity: .9;
  background: linear-gradient(90deg, rgba(var(--metric-accent-rgb), .15), rgba(var(--metric-accent-rgb), .8), rgba(var(--metric-accent-rgb), .15));
}

html:not(.theme-dark) #tab-reales .metric-card::after,
html:not(.theme-dark) #topCardsReales .metric-card::after {
  display: none;
}

html:not(.theme-dark) #tab-reales .metric-card .metric-icon,
html:not(.theme-dark) #topCardsReales .metric-card .metric-icon {
  border-color: rgba(var(--metric-accent-rgb), .3);
  background: linear-gradient(180deg, rgba(var(--metric-accent-rgb), .2), rgba(var(--metric-accent-rgb), .09));
  color: rgb(var(--metric-accent-rgb));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 6px 12px rgba(15, 23, 42, .08);
}

html:not(.theme-dark) #tab-reales .grad-gas,
html:not(.theme-dark) #topCardsReales .grad-gas {
  --metric-accent-rgb: 37, 99, 235;
}

html:not(.theme-dark) #tab-reales .grad-pea,
html:not(.theme-dark) #topCardsReales .grad-pea {
  --metric-accent-rgb: 217, 119, 6;
}

html:not(.theme-dark) #tab-reales .grad-ali,
html:not(.theme-dark) #topCardsReales .grad-ali {
  --metric-accent-rgb: 8, 145, 178;
}

html:not(.theme-dark) #tab-reales .grad-hos,
html:not(.theme-dark) #topCardsReales .grad-hos {
  --metric-accent-rgb: 22, 163, 74;
}

html:not(.theme-dark) #tab-reales .grad-imp,
html:not(.theme-dark) #topCardsReales .grad-imp {
  --metric-accent-rgb: 220, 38, 38;
}

html:not(.theme-dark) #tab-reales .grad-tot,
html:not(.theme-dark) #topCardsReales .grad-tot {
  --metric-accent-rgb: 59, 130, 246;
}

#tab-reales .metric-card,
#topCardsReales .metric-card {
  --metric-accent-rgb: 111, 139, 189;
  --metric-bg-a: #112142;
  --metric-bg-b: #0b1730;
  min-height: clamp(98px, 18vmin, 140px);
  border-radius: 14px;
  border: 1px solid rgba(var(--metric-accent-rgb), .46);
  padding: 12px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  user-select: none;
  background:
    radial-gradient(circle at 92% 12%, rgba(var(--metric-accent-rgb), .24) 0%, rgba(var(--metric-accent-rgb), 0) 45%),
    linear-gradient(165deg, var(--metric-bg-a) 0%, var(--metric-bg-b) 100%);
  box-shadow: inset 0 1px 0 rgba(166, 191, 234, .1), 0 10px 22px rgba(2, 9, 24, .42);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

#tab-reales .metric-card:hover,
#topCardsReales .metric-card:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--metric-accent-rgb), .74);
  box-shadow: inset 0 1px 0 rgba(183, 206, 245, .15), 0 14px 26px rgba(3, 12, 31, .5);
}

#tab-reales .metric-card::before,
#tab-reales .metric-card::after,
#topCardsReales .metric-card::before,
#topCardsReales .metric-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 3px;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 255, 255, .06), rgba(var(--metric-accent-rgb), .95), rgba(255, 255, 255, .06));
  opacity: .78;
  pointer-events: none;
}

#tab-reales .metric-card::after,
#topCardsReales .metric-card::after {
  top: auto;
  bottom: -22px;
  left: -14%;
  width: 58%;
  height: 58%;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(var(--metric-accent-rgb), .22) 0%, rgba(var(--metric-accent-rgb), 0) 70%);
  opacity: .7;
  filter: blur(5px);
}

#tab-reales .metric-card::before,
#topCardsReales .metric-card::before {
  z-index: 1;
}

#tab-reales .metric-card .k,
#topCardsReales .metric-card .k {
  font-size: .73rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .94);
  text-shadow: 0 1px 8px rgba(0, 0, 0, .35);
}

#tab-reales .metric-card .v,
#topCardsReales .metric-card .v {
  margin-top: 7px;
  color: #ffffff;
  background: none;
  -webkit-text-fill-color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}

#tab-reales .metric-card .metric-icon,
#topCardsReales .metric-card .metric-icon {
  border-color: rgba(var(--metric-accent-rgb), .55);
  background: linear-gradient(180deg, rgba(var(--metric-accent-rgb), .25), rgba(var(--metric-accent-rgb), .11));
  color: #f8fbff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 8px 16px rgba(2, 9, 24, .3);
}

#tab-reales .metric-card:hover .metric-icon,
#topCardsReales .metric-card:hover .metric-icon {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

#tab-reales .grad-gas,
#topCardsReales .grad-gas {
  --metric-accent-rgb: 106, 143, 200;
  --metric-bg-a: #122643;
  --metric-bg-b: #0a162a;
}

#tab-reales .grad-pea,
#topCardsReales .grad-pea {
  --metric-accent-rgb: 96, 160, 178;
  --metric-bg-a: #11253e;
  --metric-bg-b: #0a192c;
}

#tab-reales .grad-ali,
#topCardsReales .grad-ali {
  --metric-accent-rgb: 178, 144, 97;
  --metric-bg-a: #2a2218;
  --metric-bg-b: #17120c;
}

#tab-reales .grad-hos,
#topCardsReales .grad-hos {
  --metric-accent-rgb: 104, 167, 140;
  --metric-bg-a: #112a24;
  --metric-bg-b: #0a1815;
}

#tab-reales .grad-imp,
#topCardsReales .grad-imp {
  --metric-accent-rgb: 176, 112, 112;
  --metric-bg-a: #2a171a;
  --metric-bg-b: #150d10;
}

#tab-reales .grad-tot,
#topCardsReales .grad-tot {
  --metric-accent-rgb: 126, 134, 204;
  --metric-bg-a: #1d1f3c;
  --metric-bg-b: #101225;
}

.summary-pill {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--subgrid-bg);
  padding: .7rem .85rem;
  min-height: 94px;
}

.summary-pill .k {
  color: var(--muted-color);
  font-size: .82rem;
}

.summary-pill .v {
  font-size: 1.45rem;
  font-weight: 800;
  margin-top: .35rem;
}

.summary-pill.summary-pill-hero {
  display: flex;
  align-items: center;
  gap: .8rem;
  min-height: 118px;
  padding: .9rem;
}

.summary-pill-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 1.35rem;
}

.summary-pill-content {
  min-width: 0;
}

.summary-pill.summary-pill-hero .k {
  margin: 0;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .64rem;
  font-weight: 800;
}

.summary-pill.summary-pill-hero .v {
  margin-top: .15rem;
  font-size: clamp(1.55rem, 2.2vmin, 2rem);
  line-height: 1.1;
}

.summary-pill-note {
  margin-top: .1rem;
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary-pill-flag {
  margin-top: .35rem;
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  border-radius: 10px;
  padding: .16rem .55rem;
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}

html:not(.theme-dark) .summary-pill {
  border-color: #d5dfef;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 8px 16px rgba(15, 23, 42, .06);
}

html:not(.theme-dark) .summary-pill .k {
  color: #64748b;
}

html:not(.theme-dark) .summary-pill .v {
  color: #0f172a;
}

html:not(.theme-dark) #topCardsComparativo .summary-pill.summary-pill-hero {
  --cmp-accent: 102, 126, 173;
  border-color: rgba(var(--cmp-accent), .56);
  background:
    radial-gradient(100% 130% at 90% 0%, rgba(var(--cmp-accent), .14) 0%, rgba(var(--cmp-accent), 0) 60%),
    linear-gradient(145deg, rgba(255, 255, 255, .76), rgba(var(--cmp-accent), .12));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    0 10px 22px rgba(15, 23, 42, .08);
}

html:not(.theme-dark) #topCardsComparativo .summary-pill-icon {
  color: #fff;
  border: 1px solid rgba(var(--cmp-accent), .45);
  background: linear-gradient(160deg, rgba(var(--cmp-accent), .92), rgba(var(--cmp-accent), .72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 8px 14px rgba(30, 64, 114, .16);
}

html:not(.theme-dark) #topCardsComparativo .summary-pill .k {
  color: rgba(73, 91, 124, .85);
  font-size: .66rem;
}

html:not(.theme-dark) #topCardsComparativo .summary-pill .v {
  color: #111a2d;
}

html:not(.theme-dark) #topCardsComparativo .summary-pill-note {
  color: #607191;
}

html:not(.theme-dark) #topCardsComparativo .summary-pill-flag {
  color: #8a5a08;
  border: 1px solid rgba(181, 132, 50, .38);
  background: linear-gradient(180deg, rgba(255, 237, 196, .65), rgba(239, 219, 173, .42));
}

html:not(.theme-dark) #topCardsComparativo .cmp-sales {
  --cmp-accent: 37, 99, 235;
}

html:not(.theme-dark) #topCardsComparativo .cmp-plan {
  --cmp-accent: 124, 58, 237;
}

html:not(.theme-dark) #topCardsComparativo .cmp-compliance {
  --cmp-accent: 34, 197, 94;
}

html:not(.theme-dark) #topCardsComparativo .cmp-diff {
  --cmp-accent: 234, 142, 11;
}

.week-selector-wrap {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--week-wrap-bg);
  padding: .55rem;
}

.week-mini-calendar {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.week-mini-head {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .35rem;
  padding-left: 12.5rem;
}

.week-mini-head span {
  text-align: center;
  font-size: .7rem;
  color: var(--week-head-text);
  font-weight: 700;
}

.week-mini-row {
  width: 100%;
  border: 1px solid var(--week-row-border);
  background: var(--week-row-bg);
  border-radius: 10px;
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: .5rem;
  align-items: center;
  padding: .45rem .55rem;
  text-align: left;
}

.week-mini-row:hover {
  border-color: var(--week-row-hover-border);
  background: var(--week-row-hover-bg);
}

.week-mini-row.is-active {
  border-color: var(--week-row-active-border);
  background: var(--week-row-active-bg);
  box-shadow: inset 0 0 0 1px rgba(47, 98, 255, .25);
}

.week-mini-row.is-current .week-mini-title::after {
  content: " (actual)";
  color: var(--accent);
  font-weight: 700;
}

.week-mini-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.week-mini-title {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-color);
}

.week-mini-range {
  font-size: .74rem;
  color: var(--muted-color);
  margin-top: .15rem;
}

.week-mini-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .35rem;
}

.day-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--day-chip-border);
  border-radius: 7px;
  background: var(--day-chip-bg);
  color: var(--day-chip-text);
  font-size: .74rem;
  font-weight: 700;
  padding: .25rem 0;
}

.day-chip.is-out {
  background: var(--day-chip-out-bg);
  color: var(--day-chip-out-text);
}

.week-selected-info {
  font-size: .78rem;
  color: var(--week-selected-text);
  padding: .4rem .55rem;
  border: 1px dashed var(--week-selected-border);
  border-radius: 8px;
  background: var(--week-selected-bg);
}

.gastos-week-selector {
  overflow: visible;
  padding: .85rem .95rem;
}

.gastos-week-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: .8rem;
}

.gastos-week-field {
  flex: 0 0 174px;
  min-width: 160px;
}

.gastos-user-filter-field {
  flex: 0 0 220px;
  min-width: 190px;
}

.gastos-week-field .form-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--week-head-text);
}

.gastos-mini-week-control {
  flex: 1 1 320px;
  min-width: min(100%, 320px);
}

.gastos-mini-week-control .planning-mini-week-toggle {
  width: 100%;
  min-width: 0;
}

.gastos-week-panel {
  right: auto;
  left: 0;
  width: min(360px, calc(100vw - 40px));
}

.gastos-week-panel-header {
  grid-template-columns: 1fr;
  gap: 0;
  margin-bottom: 10px;
}

.gastos-week-option .planning-mini-week-option-main {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.gastos-week-summary {
  margin-top: .75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
  padding: .5rem .75rem;
  border-radius: 12px;
  border: 1px solid rgba(162, 180, 208, .42);
  background: linear-gradient(180deg, rgba(255, 255, 255, .84), rgba(242, 247, 255, .92));
  color: var(--text-color);
  font-size: .8rem;
  line-height: 1.2;
}

.gastos-week-summary strong {
  color: var(--subgrid-title);
}

.gastos-week-summary span {
  color: var(--muted-color);
}

.real-client-filter-wrap {
  min-width: 220px;
}

.real-client-filter-wrap .form-select {
  min-width: 200px;
}

.km-accum-col,
.km-accum-cell {
  width: 86px;
  white-space: nowrap;
}

html:not(.theme-dark) #weekStatusCard.alert-info {
  --bs-alert-color: #5a3a08;
  --bs-alert-border-color: #e7ba65;
  color: #5a3a08;
  border-color: #e7ba65 !important;
  background: linear-gradient(135deg, #fff1cf 0%, #ffe2a3 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 8px 16px rgba(141, 102, 35, .16);
}

html:not(.theme-dark) #weekStatusCard.alert-info strong {
  color: #3f2700;
}

.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text-color);
  --bs-table-border-color: var(--border);
  --bs-table-hover-color: var(--text-color);
  --bs-table-hover-bg: var(--table-hover-bg);
}

.table thead th {
  color: var(--subgrid-title);
}

.text-muted {
  color: var(--muted-color) !important;
}

.topbar-theme-toggle:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 .2rem rgba(47, 98, 255, .22);
}

html.theme-dark .cloud-card {
  box-shadow: 0 14px 34px rgba(2, 9, 24, .5);
}

html.theme-dark .table-responsive {
  border-radius: 10px;
}

html.theme-dark .btn-outline-secondary,
html.theme-dark .btn-outline-dark {
  --bs-btn-color: #d3dfff;
  --bs-btn-border-color: #4d6698;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: #1d3566;
  --bs-btn-hover-border-color: #6d8ecf;
  --bs-btn-active-bg: #204078;
  --bs-btn-active-border-color: #6d8ecf;
}

html.theme-dark .alert-info {
  --bs-alert-color: #dce9ff;
  --bs-alert-bg: #112548;
  --bs-alert-border-color: #365c99;
}

html.theme-dark .leaflet-tile {
  filter: saturate(.82) brightness(.9) contrast(.88);
}

html.theme-dark .leaflet-control-zoom a {
  background: #102040;
  color: #d4e2ff;
  border-color: #274374;
}

@media (max-width: 991.98px) {
  .app-sidebar {
    width: 72px;
    padding: 10px 8px;
  }

  .brand-top {
    justify-content: center;
  }

  .brand-image {
    width: 38px;
  }

  .brand-title,
  .brand-sub,
  .sidebar-nav .nav-link span {
    display: none;
  }

  .sidebar-nav .nav-link {
    text-align: center;
  }

  .sidebar-nav .nav-link i {
    margin-right: 0 !important;
  }

  .pipeline-switch {
    justify-content: flex-start;
  }

  .topbar-theme-toggle .theme-toggle-text {
    display: none;
  }

  .topbar-theme-toggle {
    padding: .35rem .5rem;
  }

  .week-mini-head {
    padding-left: 0;
  }

  .week-mini-row {
    grid-template-columns: 1fr;
  }

  .gastos-week-field,
  .gastos-mini-week-control {
    flex: 1 1 100%;
    min-width: 0;
  }

  .real-client-filter-wrap,
  .real-client-filter-wrap .form-select {
    min-width: 0;
    width: 100%;
  }

  .gastos-week-panel {
    width: min(100%, calc(100vw - 32px));
  }

  .plan-header {
    align-items: stretch !important;
  }

  .plan-header-title {
    flex: 1 0 100%;
    margin-bottom: 2px;
  }

  .plan-header-actions {
    margin-left: 0;
    width: 100%;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px !important;
  }

  .plan-header-actions .btn {
    width: 100%;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: normal;
    text-align: center;
    line-height: 1.1;
    margin: 0 !important;
  }

  #map {
    height: 156px;
  }

  #exec-map {
    height: 120px;
  }

  .dashboard-home-page .dashboard-toolbar {
    width: 100%;
    margin-left: 0;
  }

  .dashboard-home-page .dashboard-toolbar .form-control,
  .dashboard-home-page .dashboard-toolbar .form-select {
    min-width: 0;
    width: 100%;
  }

  .dash-calendar-grid {
    gap: 0;
  }

  .dash-day-cell {
    min-height: 74px;
    padding: 6px;
  }

  .dash-day-event {
    font-size: .62rem;
    padding: 2px 5px;
  }

  .dash-week-grid {
    gap: 9px;
  }

  .dash-week-compact-wrap {
    overflow-x: auto;
  }

  .dash-week-compact-table {
    min-width: 740px;
    table-layout: auto;
  }

  .dash-week-compact-table thead th {
    font-size: .64rem;
    padding-top: .5rem;
    padding-bottom: .5rem;
  }

  .dash-week-compact-table tbody th {
    font-size: .64rem;
  }

  .dash-week-compact-table tbody td {
    font-size: .84rem;
  }

  .dash-week-filter-bar {
    width: 100%;
    align-items: stretch;
    gap: 8px;
  }

  .dash-week-filter-group {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
  }

  .dash-week-filter-group .form-select {
    min-width: 0;
    width: 100%;
  }

  #dashWeekRangeLabel {
    width: 100%;
    align-self: flex-start;
    font-size: .74rem;
  }

  .dash-week-grid-head {
    display: none;
  }

  .dash-week-row {
    grid-template-columns: 1fr;
    border: 1px solid rgba(176, 195, 224, .72);
    background: linear-gradient(180deg, rgba(249, 252, 255, .96), rgba(240, 246, 255, .92));
    padding: 9px 10px;
    gap: 6px;
  }

  .dash-week-row-label {
    font-size: .95rem;
    color: #223c64;
  }

  .dash-week-row-icon {
    width: 26px;
    height: 26px;
    font-size: .82rem;
  }

  .dash-week-row-value {
    justify-content: space-between;
    text-align: left !important;
    margin: 0;
    padding: 4px 0;
    border-top: 1px dashed rgba(170, 191, 220, .62);
    font-size: .92rem;
  }

  .dash-week-row-value[data-kind="plan"]::before {
    content: 'Planificado';
    display: inline-flex;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #5472a3;
    border-radius: 999px;
    border: 1px solid rgba(135, 159, 197, .58);
    background: rgba(232, 240, 254, .72);
    padding: 2px 8px;
  }

  .dash-week-row-value[data-kind="exec"]::before {
    content: 'Ejecutado';
    display: inline-flex;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #386f5d;
    border-radius: 999px;
    border: 1px solid rgba(120, 179, 156, .62);
    background: rgba(224, 248, 241, .72);
    padding: 2px 8px;
  }

  .dash-week-row-label.is-total,
  .dash-week-row-value.is-total {
    border-top-width: 1px;
    padding-top: 4px;
  }

  .dash-context-menu {
    min-width: 132px;
    max-width: calc(100vw - 20px);
  }

  .dash-context-item {
    font-size: .72rem;
    padding: 6px 9px;
  }

  .dash-day-modal-actions .btn {
    width: 100%;
  }

  .dash-charts-row .dash-chart-card .card-body {
    height: 220px;
  }

  .dash-pending-card .card-body {
    max-height: 360px;
    overflow: hidden;
  }

  .dash-pending-card .dash-list-stack {
    max-height: 292px;
  }
}

/* ==========================================================
   Vacaciones-Inspired Dark UI (requested visual direction)
   ========================================================== */

html.theme-dark body {
  background: radial-gradient(ellipse at bottom, #1a2837 0%, #0f1622 58%, #090d14 100%);
  color: #d9e4fb;
}

html.theme-dark body::before {
  inset: 0;
  filter: none;
  background:
    radial-gradient(1px 1px at 7% 11%, rgba(255, 255, 255, .8), transparent 76%),
    radial-gradient(1px 1px at 39% 31%, rgba(255, 255, 255, .72), transparent 76%),
    radial-gradient(1px 1px at 66% 17%, rgba(255, 255, 255, .7), transparent 76%),
    radial-gradient(1px 1px at 83% 53%, rgba(255, 255, 255, .66), transparent 76%),
    radial-gradient(2px 2px at 11% 62%, rgba(255, 255, 255, .56), transparent 78%),
    radial-gradient(2px 2px at 53% 72%, rgba(255, 255, 255, .52), transparent 78%),
    radial-gradient(2px 2px at 92% 29%, rgba(255, 255, 255, .48), transparent 78%),
    radial-gradient(3px 3px at 28% 84%, rgba(255, 255, 255, .36), transparent 80%);
  background-size: 180px 180px, 260px 260px, 320px 320px, 420px 420px, 620px 620px, 900px 900px, 1200px 1200px, 1600px 1600px;
  animation: dark-stars-drift 180s linear infinite, dark-stars-twinkle 8s ease-in-out infinite;
  opacity: .96;
}

html.theme-dark body::after {
  inset: 0;
  background:
    radial-gradient(ellipse at bottom, rgba(18, 30, 45, .04) 0%, rgba(8, 12, 19, .14) 100%),
    linear-gradient(180deg, rgba(7, 10, 17, .02) 0%, rgba(3, 5, 10, .1) 100%);
  animation: none;
  opacity: .2;
}

html.theme-dark .app-shell {
  padding: 14px;
  gap: 14px;
  min-height: 100dvh;
  background: transparent;
}

html.theme-dark .app-sidebar {
  width: 220px;
  background: linear-gradient(180deg, rgba(6, 15, 31, .98) 0%, rgba(3, 9, 22, .98) 100%);
  border: 1px solid rgba(36, 59, 93, .66);
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(92, 121, 170, .14), 0 16px 35px rgba(2, 8, 24, .64);
}

html.theme-dark .app-shell.sidebar-collapsed .app-sidebar {
  width: 84px;
}

html.theme-dark .brand-wrap {
  border-bottom-color: rgba(84, 120, 181, .32);
}

html.theme-dark .brand-image {
  width: 184px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .35));
}

html.theme-dark .app-shell.sidebar-collapsed .brand-image {
  width: 44px;
}

html.theme-dark .brand-title {
  font-weight: 700;
  letter-spacing: .5px;
  color: #f1f6ff;
}

html.theme-dark .brand-sub {
  color: #9fb3d8;
  opacity: 1;
}

html.theme-dark .sidebar-toggle-btn {
  border-color: rgba(108, 142, 210, .45);
  background: rgba(18, 39, 78, .72);
  color: #d6e5ff;
  box-shadow: 0 6px 14px rgba(1, 7, 20, .35);
}

html.theme-dark .sidebar-toggle-btn:hover {
  background: rgba(31, 58, 109, .9);
  border-color: rgba(133, 165, 228, .75);
}

html.theme-dark .topbar-brand {
  background: rgba(8, 19, 40, .78);
  border-color: rgba(58, 89, 138, .52);
  box-shadow: inset 0 1px 0 rgba(109, 136, 181, .1);
}

html.theme-dark .topbar-logo {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .45));
}

html.theme-dark .top-nav-menu {
  background: rgba(4, 8, 16, .96);
  border: 1px solid rgba(50, 73, 107, .34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03), 0 12px 22px rgba(2, 9, 24, .58);
}

html.theme-dark .top-nav-menu .menu-bubbles {
  background: linear-gradient(160deg, rgba(255, 255, 255, .05) 0%, rgba(255, 255, 255, .015) 100%);
  border-color: rgba(94, 124, 182, .35);
}

html.theme-dark .top-nav-menu .menu-bubbles .dot {
  background: rgba(238, 244, 255, .9);
  box-shadow: 0 0 0 1px rgba(173, 196, 236, .18), 0 0 12px rgba(128, 160, 220, .38);
}

html.theme-dark .top-nav-menu .nav-link {
  color: #d8e6ff;
}

html.theme-dark .top-nav-menu .nav-link:hover {
  background: rgba(16, 31, 54, .84);
}

html.theme-dark .top-nav-menu .nav-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, #294b7e, #223f68);
  box-shadow: 0 10px 18px rgba(14, 38, 74, .54), 0 0 8px rgba(54, 88, 139, .2);
}

html.theme-dark .top-nav-menu .menu-bubbles.active {
  background: linear-gradient(135deg, #294b7e, #223f68);
  border-color: rgba(88, 115, 158, .56);
  box-shadow: 0 10px 18px rgba(14, 38, 74, .54), 0 0 8px rgba(54, 88, 139, .2);
}

html.theme-dark .top-nav-menu .menu-link-plan .menu-icon-chip {
  background: linear-gradient(165deg, rgba(18, 110, 65, .34) 0%, rgba(11, 59, 37, .3) 100%);
  border-color: rgba(94, 196, 142, .36);
  color: #64d9a0;
}

html.theme-dark .top-nav-menu .menu-link-ejec .menu-icon-chip {
  background: linear-gradient(165deg, rgba(14, 93, 146, .34) 0%, rgba(8, 50, 92, .3) 100%);
  border-color: rgba(88, 166, 220, .34);
  color: #79cbff;
}

html.theme-dark .top-nav-menu .menu-link-gastos .menu-icon-chip {
  background: linear-gradient(165deg, rgba(137, 73, 21, .34) 0%, rgba(88, 43, 11, .3) 100%);
  border-color: rgba(223, 148, 84, .34);
  color: #ffba7e;
}

html.theme-dark .top-nav-menu-final {
  background: linear-gradient(180deg, rgba(13, 22, 39, .94), rgba(10, 17, 29, .9));
  border-color: rgba(67, 95, 144, .62);
  box-shadow: 0 10px 25px rgba(3, 13, 30, .34);
}

html.theme-dark .top-nav-menu-final .action-link {
  color: #dbe7ff;
  background-color: rgba(11, 18, 32, .92);
  border-color: rgba(54, 74, 112, .88);
  box-shadow: inset 0 1px 0 rgba(120, 146, 194, .08);
}

html.theme-dark .top-nav-menu-final .action-link::before {
  background: linear-gradient(180deg, rgba(24, 37, 61, .96), rgba(19, 29, 48, .9));
}

html.theme-dark .top-nav-menu-final .action-link:hover,
html.theme-dark .top-nav-menu-final .action-link:focus-visible {
  color: #f8fbff;
}

html.theme-dark .top-nav-menu-final .action-link.active {
  color: #ffffff;
  border-color: rgba(92, 124, 181, .94);
  background: linear-gradient(180deg, rgba(28, 45, 77, .96), rgba(22, 34, 58, .92));
  box-shadow: 0 12px 22px rgba(2, 10, 22, .46), 0 0 0 1px rgba(92, 124, 181, .24);
}

html.theme-dark .top-nav-menu-final .action-link.active::before {
  background: linear-gradient(180deg, rgba(38, 61, 103, .98), rgba(31, 49, 82, .94));
}

html.theme-dark .top-nav-menu-final.is-icon-only .action-link {
  box-shadow: inset 0 1px 0 rgba(120, 146, 194, .08), 0 8px 16px rgba(4, 11, 24, .28);
}

html.theme-dark .top-nav-menu-final .action-icon-home {
  color: #8cc2ff;
}

html.theme-dark .top-nav-menu-final .action-icon-gastos {
  color: #ffcb8d;
}

.tooltip {
  --bs-tooltip-bg: rgba(3, 12, 28, .96);
  --bs-tooltip-color: #e3eeff;
  --bs-tooltip-opacity: 1;
  z-index: 2208;
}

html.theme-dark .topbar {
  height: auto;
  min-height: calc(var(--topbar-logo-size) + 14px);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(8, 17, 34, .72), rgba(7, 13, 26, .68));
  border: 1px solid rgba(34, 56, 87, .62);
  box-shadow: inset 0 1px 0 rgba(86, 110, 150, .11), 0 14px 28px rgba(1, 8, 24, .5);
  backdrop-filter: blur(8px);
}

html.theme-dark .app-main-topnav,
html.theme-dark .content-wrap,
html.theme-dark .content-wrap>.container-fluid,
html.theme-dark .dashboard-home-page {
  background: transparent !important;
}

/* Light mode topnav radar/grid: backgrounds defined in base rules above */

html.theme-dark .app-shell-topnav::before {
  /* Dejamos que body::before (aerosol del login) sea el fondo principal */
  background: none;
  filter: none;
  animation: none;
}

html.theme-dark .app-shell-topnav::after {
  /* Eliminar puntos/dots */
  background: none;
  opacity: 0;
  animation: none;
}

html.theme-dark .app-main-topnav::before {
  /* Eliminar grid de líneas */
  background: none;
  animation: none;
}

html.theme-dark .app-main-topnav::after {
  opacity: 0;
  background: none;
  animation: none;
}

/* Telegram inner panels */
.tg-panel {
  background: #ffffff;
}

html.theme-dark .tg-panel {
  background: linear-gradient(140deg, rgba(255,255,255,.07) 0%, rgba(255,255,255,.02) 50%, rgba(255,255,255,.04) 100%), rgba(6,12,26,.84) !important;
  border-color: rgba(198, 215, 246, .22) !important;
  color: var(--text-color);
}

html.theme-dark .topbar-title {
  color: #e8f0ff;
  letter-spacing: .2px;
}

html.theme-dark .topbar-user {
  color: #cfdef9;
}

html.theme-dark .avatar {
  background: linear-gradient(135deg, #2f5ca9, #2b4f8e);
  box-shadow: 0 6px 16px rgba(14, 37, 84, .55);
}

html.theme-dark .topbar-theme-toggle {
  border-color: rgba(67, 95, 144, .72);
  background: linear-gradient(180deg, rgba(16, 33, 61, .88), rgba(10, 21, 39, .84));
  color: #dce8ff;
}

html.theme-dark .topbar-users-btn,
html.theme-dark .topbar-logout-btn {
  border-color: rgba(67, 95, 144, .72);
  background: linear-gradient(180deg, rgba(16, 33, 61, .88), rgba(10, 21, 39, .84));
  color: #dce8ff;
  box-shadow: inset 0 1px 0 rgba(128, 161, 216, .12), 0 8px 14px rgba(3, 13, 30, .42);
}

html.theme-dark .topbar-users-btn:hover,
html.theme-dark .topbar-logout-btn:hover {
  filter: brightness(1.08);
}

html.theme-dark .topbar-users-btn.active {
  border-color: rgba(103, 138, 196, .84);
  color: #f2f7ff;
  box-shadow: inset 0 1px 0 rgba(157, 186, 234, .16), 0 10px 16px rgba(7, 18, 40, .5);
}

html.theme-dark .topbar-theme-toggle .theme-toggle-orb {
  background: linear-gradient(160deg, #0d1d36 0%, #1d3c67 100%);
  border-color: rgba(126, 156, 206, .28);
  box-shadow: inset 0 1px 1px rgba(214, 230, 255, .15), 0 8px 14px rgba(3, 13, 30, .46);
}

html.theme-dark .topbar-theme-toggle:hover {
  filter: brightness(1.08);
}

html.theme-dark .content-wrap {
  padding: 0;
}

html.theme-dark .content-wrap>.container-fluid>.cloud-card {
  opacity: 0;
  animation: fade-in .52s ease forwards;
}

html.theme-dark .content-wrap>.container-fluid>.cloud-card:nth-of-type(2) {
  animation-delay: .08s;
}

html.theme-dark .content-wrap>.container-fluid>.cloud-card:nth-of-type(3) {
  animation-delay: .16s;
}

html.theme-dark .content-wrap>.container-fluid>.cloud-card:nth-of-type(4) {
  animation-delay: .24s;
}

html.theme-dark .cloud-card {
  position: relative;
  border: 1px solid rgba(40, 61, 92, .8);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(8, 17, 33, .74) 0%, rgba(7, 14, 27, .7) 100%);
  box-shadow:
    inset 0 1px 0 rgba(84, 108, 147, .1),
    0 16px 36px rgba(2, 10, 28, .62),
    0 0 0 1px rgba(16, 30, 52, .22);
  overflow: hidden;
  backdrop-filter: blur(8px);
}

html.theme-dark .cloud-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(77, 101, 141, .11), rgba(99, 131, 184, .34), rgba(77, 101, 141, .11));
  pointer-events: none;
}

html.theme-dark .cloud-card .card-header {
  background: linear-gradient(180deg, rgba(23, 42, 72, .9), rgba(13, 27, 50, .86));
  border-bottom: 1px solid rgba(43, 67, 99, .72);
  padding: 11px 14px;
}

html.theme-dark .dashboard-home-page .cloud-card {
  background: linear-gradient(180deg, rgba(8, 17, 33, .66) 0%, rgba(7, 14, 27, .62) 100%);
}

html.theme-dark .cloud-card .card-body {
  padding: 14px;
}

html.theme-dark .subgrid {
  border: 1px solid rgba(43, 66, 98, .72);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(10, 21, 40, .72), rgba(8, 16, 31, .68));
  box-shadow: inset 0 1px 0 rgba(83, 106, 144, .08);
  padding: 10px;
}

html.theme-dark .subgrid-title {
  color: #bcd0f4;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  font-size: .72rem;
}

html.theme-dark .form-label {
  color: #aec2e6;
}

html.theme-dark .form-control,
html.theme-dark .form-select {
  background: rgba(6, 15, 29, .9);
  border-color: rgba(43, 67, 100, .86);
  color: #e6f0ff;
  border-radius: 10px;
}

html.theme-dark .form-control::placeholder {
  color: #89a0cb;
}

html.theme-dark .form-control:focus,
html.theme-dark .form-select:focus {
  border-color: #5f86bf;
  box-shadow: 0 0 0 .2rem rgba(70, 111, 176, .2);
}

html.theme-dark #exec_evidencia.form-control {
  background: linear-gradient(180deg, rgba(8, 18, 35, .95), rgba(6, 13, 27, .95));
  border-color: rgba(61, 94, 144, .86);
  color: #dbe8ff;
}

html.theme-dark #exec_evidencia.form-control::file-selector-button {
  margin-right: .55rem;
  border: 1px solid rgba(85, 124, 185, .92);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(35, 67, 116, .96), rgba(24, 49, 91, .96));
  color: #f2f7ff;
  font-weight: 700;
  padding: .28rem .62rem;
  box-shadow: inset 0 1px 0 rgba(168, 195, 236, .2), 0 4px 10px rgba(3, 12, 31, .35);
  transition: filter .18s ease, transform .18s ease;
}

html.theme-dark #exec_evidencia.form-control::-webkit-file-upload-button {
  margin-right: .55rem;
  border: 1px solid rgba(85, 124, 185, .92);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(35, 67, 116, .96), rgba(24, 49, 91, .96));
  color: #f2f7ff;
  font-weight: 700;
  padding: .28rem .62rem;
  box-shadow: inset 0 1px 0 rgba(168, 195, 236, .2), 0 4px 10px rgba(3, 12, 31, .35);
  transition: filter .18s ease, transform .18s ease;
}

html.theme-dark #exec_evidencia.form-control:hover::file-selector-button,
html.theme-dark #exec_evidencia.form-control:hover::-webkit-file-upload-button {
  filter: brightness(1.08);
}

.exec-evidence-item {
  border: 1px solid rgba(175, 195, 225, .82);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(249, 252, 255, .92), rgba(243, 248, 255, .9));
  padding: 8px 10px;
}

.exec-evidence-head {
  font-size: .78rem;
  font-weight: 700;
  color: #445f88;
  margin-bottom: 6px;
}

.exec-evidence-hint {
  display: inline-block;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exec-evidence-trigger {
  flex: 0 0 auto;
}

html.theme-dark .exec-evidence-item {
  border-color: rgba(57, 86, 130, .8);
  background: linear-gradient(180deg, rgba(10, 22, 43, .86), rgba(8, 16, 31, .86));
}

html.theme-dark .exec-evidence-head {
  color: #b7cbeb;
}

html.theme-dark .exec-evidence-trigger {
  border-color: rgba(78, 118, 180, .86);
  color: #dbe9ff;
  background: linear-gradient(180deg, rgba(28, 55, 100, .94), rgba(20, 39, 74, .94));
}

html.theme-dark .exec-evidence-trigger:hover {
  border-color: rgba(99, 139, 202, .92);
  color: #eff6ff;
  background: linear-gradient(180deg, rgba(34, 66, 116, .96), rgba(24, 48, 86, .96));
}

.btn-camera-action,
#btn_take_photo {
  border: 1px solid rgba(67, 114, 183, .86);
  color: #f2f7ff;
  background: linear-gradient(180deg, #2d6fcb 0%, #1f56aa 100%);
  box-shadow: inset 0 1px 0 rgba(197, 219, 255, .2), 0 8px 16px rgba(17, 44, 90, .28);
  font-weight: 700;
  letter-spacing: .01em;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease, border-color .16s ease;
}

.btn-camera-action:hover,
#btn_take_photo:hover {
  border-color: rgba(79, 133, 214, .94);
  color: #fff;
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(214, 230, 255, .24), 0 12px 20px rgba(17, 44, 90, .33);
}

.btn-camera-action:active,
#btn_take_photo:active,
#btn_take_photo.is-capturing {
  transform: translateY(0);
  filter: brightness(.98);
  box-shadow: inset 0 2px 6px rgba(9, 30, 72, .35), 0 5px 10px rgba(17, 44, 90, .24);
}

html.theme-dark #btn_take_photo {
  border-color: rgba(208, 142, 72, .92);
  color: #ffe5c9;
  background: linear-gradient(180deg, rgba(131, 80, 30, .92), rgba(82, 49, 18, .92));
  box-shadow: inset 0 1px 0 rgba(255, 218, 177, .18), 0 8px 16px rgba(36, 18, 6, .42);
}

html.theme-dark #btn_take_photo:hover {
  border-color: rgba(228, 164, 97, .98);
  color: #fff4e7;
  background: linear-gradient(180deg, rgba(152, 93, 37, .96), rgba(99, 58, 21, .96));
  box-shadow: inset 0 1px 0 rgba(255, 229, 196, .22), 0 12px 20px rgba(36, 18, 6, .5);
}

html.theme-dark #btn_take_photo:active,
html.theme-dark #btn_take_photo.is-capturing {
  box-shadow: inset 0 2px 8px rgba(47, 24, 8, .55), 0 5px 10px rgba(36, 18, 6, .35);
}

html.theme-dark .btn {
  border-radius: 10px;
  font-weight: 600;
}

html.theme-dark .btn-primary {
  --bs-btn-bg: linear-gradient(135deg, #3b6dbb, #305a9f);
  --bs-btn-border-color: #4a73b5;
  --bs-btn-hover-bg: linear-gradient(135deg, #4779c6, #3665ab);
  --bs-btn-hover-border-color: #5e87ca;
  --bs-btn-active-bg: linear-gradient(135deg, #335ea3, #2c528f);
  --bs-btn-active-border-color: #5e87ca;
  box-shadow: 0 10px 22px rgba(25, 56, 103, .34);
}

html.theme-dark .btn-success {
  --bs-btn-bg: linear-gradient(135deg, #18a27d, #14886b);
  --bs-btn-border-color: #1a9a77;
  --bs-btn-hover-bg: linear-gradient(135deg, #1eb48b, #149676);
  --bs-btn-hover-border-color: #23bf93;
  box-shadow: 0 10px 22px rgba(8, 72, 57, .32);
}

html.theme-dark .btn-outline-primary {
  --bs-btn-color: #9ec0ff;
  --bs-btn-border-color: #3c5f9f;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #2c4f8f;
  --bs-btn-hover-border-color: #5f85c9;
}

html.theme-dark .btn-outline-success {
  --bs-btn-color: #9de9d2;
  --bs-btn-border-color: #26705c;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #166652;
  --bs-btn-hover-border-color: #2b8a71;
}

html.theme-dark .table {
  --bs-table-border-color: rgba(42, 65, 98, .74);
  --bs-table-hover-bg: rgba(17, 35, 63, .52);
  --bs-table-hover-color: #eff5ff;
  border-radius: 14px;
  overflow: hidden;
}

html.theme-dark .table thead th {
  color: #d5e5ff;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  border-bottom: 2px solid rgba(76, 105, 152, .72);
  background: rgba(10, 21, 40, .95);
}

html.theme-dark .table tbody td {
  color: #d8e4fb;
  border-top-color: rgba(48, 76, 125, .68);
}

html.theme-dark .table tbody tr:hover td {
  background: rgba(21, 40, 72, .5);
}

html.theme-dark .bank-order-chip {
  border-color: rgba(94, 126, 182, .5);
  background: rgba(44, 74, 127, .26);
  color: #d7e6ff;
}

html.theme-dark .planned-week-total-row td {
  background: linear-gradient(180deg, rgba(18, 33, 59, .94), rgba(12, 24, 45, .92));
  border-top-color: rgba(86, 120, 176, .72);
}

html.theme-dark .btn-approve {
  box-shadow: 0 6px 14px rgba(4, 10, 20, .42);
}

html.theme-dark .btn-approve.btn-outline-primary {
  color: #eff6ff;
  border-color: #4e76bc;
  background: linear-gradient(180deg, #3f6eb9 0%, #2e5698 100%);
}

html.theme-dark .btn-approve.btn-outline-primary:hover {
  color: #ffffff;
  border-color: #6a94da;
  background: linear-gradient(180deg, #4d7ec9 0%, #3964ab 100%);
}

html.theme-dark .btn-approve.btn-outline-warning {
  color: #ffe8bf;
  border-color: #8d6a27;
  background: linear-gradient(180deg, #9a772e 0%, #7e6023 100%);
}

html.theme-dark .btn-approve.btn-outline-warning:hover {
  color: #fff2d5;
  border-color: #b88a34;
  background: linear-gradient(180deg, #ac8532 0%, #8f6d2a 100%);
}

html.theme-dark .agenda-row-active {
  background: rgba(64, 101, 163, .2);
}

html.theme-dark .planning-unified-page #agenda-container .agenda-row-active>td {
  background: rgba(64, 101, 163, .2);
}

html.theme-dark .badge.text-bg-success {
  background: rgba(22, 163, 120, .22) !important;
  color: #76f8cd !important;
  border: 1px solid rgba(38, 188, 144, .42);
  box-shadow: 0 0 14px rgba(20, 122, 93, .22);
}

html.theme-dark .badge.text-bg-warning {
  background: rgba(153, 92, 28, .28) !important;
  color: #ffd89c !important;
  border: 1px solid rgba(215, 145, 67, .44);
}

html.theme-dark .badge.text-bg-secondary {
  background: rgba(45, 76, 130, .38) !important;
  color: #c8d9f8 !important;
  border: 1px solid rgba(97, 129, 185, .42);
}

html.theme-dark .movement-chip {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  border-radius: 999px;
  padding: .18rem .58rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .02em;
  margin-right: .35rem;
  border: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

html.theme-dark .movement-assignment {
  color: #74f0cb;
  background: rgba(16, 124, 96, .24);
  border-color: rgba(46, 180, 143, .44);
}

html.theme-dark .movement-use {
  color: #ffcaa3;
  background: rgba(150, 72, 30, .26);
  border-color: rgba(218, 129, 70, .44);
}

html.theme-dark .pipeline-switch {
  justify-content: flex-end;
  gap: .85rem;
  border-bottom: 1px solid rgba(49, 78, 125, .75);
  padding-bottom: .35rem;
}

html.theme-dark .btn-pipeline {
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #96add4;
  border-radius: 0;
  padding: .3rem .15rem;
  font-weight: 600;
}

html.theme-dark .btn-pipeline:hover {
  color: #d6e6ff;
  border-bottom-color: rgba(107, 140, 194, .66);
  background: transparent;
}

html.theme-dark .btn-pipeline.active {
  color: #f4f8ff;
  border-bottom-color: #6b8fc6;
  background: transparent;
  box-shadow: 0 10px 20px -14px rgba(81, 126, 195, .75);
}

html.theme-dark .metric-card {
  border: 1px solid rgba(59, 93, 150, .68);
  box-shadow:
    inset 0 1px 0 rgba(128, 167, 236, .16),
    0 14px 30px rgba(3, 10, 28, .48);
}

html.theme-dark .summary-pill {
  border-color: rgba(48, 81, 136, .74);
  background: linear-gradient(180deg, rgba(11, 25, 52, .82), rgba(8, 18, 40, .82));
  box-shadow: inset 0 1px 0 rgba(120, 156, 224, .1);
}

html.theme-dark .summary-pill .v {
  color: #ecf4ff;
}

html.theme-dark #topCardsComparativo .summary-pill-icon {
  color: #eaf3ff;
  border: 1px solid rgba(120, 155, 214, .38);
  background: linear-gradient(165deg, rgba(54, 88, 141, .42), rgba(31, 52, 85, .46));
}

html.theme-dark #topCardsComparativo .summary-pill-note {
  color: #95a9cc;
}

html.theme-dark #topCardsComparativo .summary-pill-flag {
  color: #d7bf8f;
  border: 1px solid rgba(178, 146, 93, .4);
  background: rgba(62, 49, 26, .48);
}

html.theme-dark .week-selector-wrap {
  position: relative;
  overflow: visible;
  border-color: rgba(64, 92, 133, .78);
  background: linear-gradient(180deg, rgba(8, 17, 34, .97), rgba(6, 13, 27, .97));
  box-shadow: inset 0 1px 0 rgba(126, 153, 201, .08), 0 14px 28px rgba(2, 8, 22, .44);
  border-radius: 14px;
  padding: .72rem;
}

html.theme-dark .week-selector-wrap::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(72, 104, 154, .16), rgba(95, 133, 196, .64), rgba(72, 104, 154, .16));
  pointer-events: none;
}

html.theme-dark .week-selector-wrap .form-control {
  background: linear-gradient(180deg, rgba(9, 20, 39, .96), rgba(7, 15, 31, .96));
  border-color: rgba(66, 94, 138, .82);
  color: #e6efff;
  box-shadow: inset 0 1px 0 rgba(132, 160, 205, .08);
}

html.theme-dark .week-selector-wrap .form-control:focus {
  border-color: rgba(88, 122, 177, .96);
  box-shadow: 0 0 0 .2rem rgba(62, 100, 160, .22), inset 0 1px 0 rgba(145, 170, 214, .1);
}

html.theme-dark .gastos-week-field .form-label {
  color: #b7c9ea;
}

html.theme-dark .gastos-week-summary {
  border-color: rgba(71, 101, 149, .58);
  background: linear-gradient(180deg, rgba(10, 21, 41, .92), rgba(8, 17, 33, .96));
  color: #edf4ff;
  box-shadow: inset 0 1px 0 rgba(124, 155, 206, .08);
}

html.theme-dark .gastos-week-summary strong {
  color: #f8fbff;
}

html.theme-dark .gastos-week-summary span,
html.theme-dark .liquidation-report-range {
  color: #94acd0;
}

/* ── Schedule Activity Modal — rich card sections & footer buttons ───────── */
@keyframes sched-card-in {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
#scheduleActivityModal .modal-content {
  border-radius: 22px;
  overflow: hidden;
  border: none;
  box-shadow: 0 32px 80px rgba(10,20,50,.28), 0 0 0 1px rgba(150,175,220,.18);
}
#scheduleActivityModal .modal-header {
  background: linear-gradient(135deg, #0f2460 0%, #1e3fa8 55%, #2e5fd4 100%);
  border-bottom: none;
  padding: 18px 22px 16px;
  position: relative;
  overflow: hidden;
}
#scheduleActivityModal .modal-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 40%, rgba(255,255,255,.08) 0%, transparent 60%);
  pointer-events: none;
}
#scheduleActivityModal .modal-header .planning-panel-kicker { color: rgba(180,210,255,.7); }
#scheduleActivityModal .modal-header .modal-title { color: #fff; font-size: 1.05rem; font-weight: 700; }
#scheduleActivityModal .modal-header .btn-close { filter: invert(1) brightness(2); opacity: .65; }
#scheduleActivityModal .modal-header .btn-close:hover { opacity: 1; }
#scheduleActivityModal .modal-header .btn.btn-view-mode {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.9);
  font-size: .74rem;
  padding: .3rem .8rem;
  border-radius: 8px;
  box-shadow: none;
  backdrop-filter: blur(8px);
  transition: background .18s, transform .15s, box-shadow .18s, border-color .18s;
}
#scheduleActivityModal .modal-header .btn.btn-view-mode:hover {
  background: rgba(255,255,255,.22);
  border-color: rgba(255,255,255,.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,.25), 0 6px 0 rgba(255,255,255,.12);
}
#scheduleActivityModal .modal-header .btn.btn-view-mode:active {
  transform: translateY(1px);
  box-shadow: none;
}
#scheduleActivityModal .modal-header .btn-outline-danger {
  background: rgba(239,68,68,.14);
  border: 1px solid rgba(239,68,68,.45);
  color: #fca5a5;
  font-size: .74rem;
  padding: .3rem .8rem;
  border-radius: 8px;
  transition: background .18s, transform .15s, box-shadow .18s;
}
#scheduleActivityModal .modal-header .btn-outline-danger:hover {
  background: rgba(239,68,68,.26);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239,68,68,.3), 0 6px 0 rgba(239,68,68,.18);
}
#scheduleActivityModal .modal-header .btn-outline-danger:active { transform: translateY(1px); box-shadow: none; }

/* Body */
#scheduleActivityModal .modal-body {
  background: linear-gradient(160deg, #e8eef8 0%, #edf1fb 100%);
  padding: 20px;
}

/* Section cards with real depth */
#scheduleActivityModal .subgrid.planning-accordion {
  background: #fff;
  border-radius: 18px;
  padding: 6px 18px 18px;
  margin-bottom: 14px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.9) inset,
    0 4px 16px rgba(30,50,110,.1),
    0 1px 3px rgba(30,50,110,.07),
    0 0 0 1px rgba(190,210,240,.5);
  animation: sched-card-in .3s ease both;
  transition: box-shadow .2s ease, transform .2s ease;
}
#scheduleActivityModal .subgrid.planning-accordion:hover {
  box-shadow:
    0 1px 0 rgba(255,255,255,.9) inset,
    0 8px 24px rgba(30,50,110,.15),
    0 2px 6px rgba(30,50,110,.08),
    0 0 0 1px rgba(160,190,230,.65);
  transform: translateY(-2px);
}
#scheduleActivityModal .subgrid.planning-accordion:nth-child(2) { animation-delay: .04s; }
#scheduleActivityModal .subgrid.planning-accordion:nth-child(3) { animation-delay: .08s; }
#scheduleActivityModal .subgrid.planning-accordion:nth-child(4) { animation-delay: .12s; }
#scheduleActivityModal .subgrid.planning-accordion .planning-accordion-body { padding: 0; }
#scheduleActivityModal .subgrid.planning-accordion .schedule-section-title { margin-top: 16px; margin-bottom: 14px; }

/* Vendedor card */
#scheduleActivityModal .modal-body > form > .mb-3 {
  background: #fff;
  border-radius: 18px;
  padding: 15px 18px;
  margin-bottom: 14px !important;
  box-shadow:
    0 1px 0 rgba(255,255,255,.9) inset,
    0 4px 16px rgba(30,50,110,.1),
    0 1px 3px rgba(30,50,110,.07),
    0 0 0 1px rgba(190,210,240,.5);
  animation: sched-card-in .25s ease both;
}

/* Footer */
#scheduleActivityModal .modal-footer {
  background: linear-gradient(160deg, #e8eef8 0%, #edf1fb 100%);
  border-top: 1px solid rgba(170,195,230,.45);
  padding: 16px 22px;
  gap: 10px;
}

/* Button base animation */
#scheduleActivityModal .modal-footer .btn-sched-close,
#scheduleActivityModal .modal-footer .btn-sched-clear,
#scheduleActivityModal .modal-footer .btn-sched-save {
  transition: transform .18s ease, box-shadow .2s ease, background .18s ease, border-color .18s ease, filter .18s ease;
}
#scheduleActivityModal .modal-footer .btn-sched-close:active,
#scheduleActivityModal .modal-footer .btn-sched-clear:active,
#scheduleActivityModal .modal-footer .btn-sched-save:active {
  transform: translateY(2px) !important;
  box-shadow: none !important;
}

/* Cerrar */
#scheduleActivityModal .modal-footer .btn-sched-close {
  border-radius: 12px;
  border: 1.5px solid rgba(110,130,170,.28);
  background: linear-gradient(180deg, #ffffff 0%, #f0f4fb 100%);
  color: #4a5878;
  font-weight: 600;
  font-size: .88rem;
  padding: .58rem 1.4rem;
  box-shadow: 0 3px 0 rgba(110,130,170,.2), 0 4px 10px rgba(30,50,100,.08);
}
#scheduleActivityModal .modal-footer .btn-sched-close:hover {
  background: linear-gradient(180deg, #f5f8ff 0%, #e8eef9 100%);
  border-color: rgba(110,130,170,.5);
  transform: translateY(-3px);
  box-shadow: 0 3px 0 rgba(110,130,170,.18), 0 8px 18px rgba(30,50,100,.12);
}

/* Limpiar */
#scheduleActivityModal .modal-footer .btn-sched-clear {
  border-radius: 12px;
  border: 1.5px solid rgba(220,80,60,.3);
  background: linear-gradient(180deg, #fff5f5 0%, #fee2e2 100%);
  color: #b91c1c;
  font-weight: 600;
  font-size: .88rem;
  padding: .58rem 1.4rem;
  box-shadow: 0 3px 0 rgba(220,60,40,.22), 0 4px 10px rgba(200,40,20,.08);
}
#scheduleActivityModal .modal-footer .btn-sched-clear:hover {
  background: linear-gradient(180deg, #fee2e2 0%, #fecaca 100%);
  border-color: rgba(200,50,30,.55);
  transform: translateY(-3px);
  box-shadow: 0 3px 0 rgba(200,50,30,.22), 0 8px 18px rgba(200,40,20,.18);
}

/* Guardar */
#scheduleActivityModal .modal-footer .btn-sched-save {
  border-radius: 12px;
  border: none;
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
  color: #fff;
  font-weight: 700;
  font-size: .88rem;
  padding: .6rem 2rem;
  box-shadow: 0 4px 0 rgba(29,78,216,.55), 0 6px 20px rgba(37,99,235,.38), inset 0 1px 0 rgba(255,255,255,.22);
  letter-spacing: .01em;
}
#scheduleActivityModal .modal-footer .btn-sched-save:hover {
  background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%);
  box-shadow: 0 4px 0 rgba(29,78,216,.5), 0 10px 28px rgba(37,99,235,.5), inset 0 1px 0 rgba(255,255,255,.28);
  transform: translateY(-3px);
  filter: brightness(1.04);
}

/* Dark mode */
html.theme-dark #scheduleActivityModal .modal-content {
  box-shadow: 0 32px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(70,100,180,.22);
}
html.theme-dark #scheduleActivityModal .modal-body {
  background: linear-gradient(160deg, #0b1225 0%, #0e1630 100%);
}
html.theme-dark #scheduleActivityModal .subgrid.planning-accordion {
  background: linear-gradient(160deg, rgba(18,28,54,.95) 0%, rgba(14,22,44,.95) 100%);
  box-shadow: 0 1px 0 rgba(80,120,200,.1) inset, 0 4px 18px rgba(0,0,0,.35), 0 0 0 1px rgba(55,85,150,.32);
}
html.theme-dark #scheduleActivityModal .subgrid.planning-accordion:hover {
  box-shadow: 0 1px 0 rgba(80,120,200,.12) inset, 0 8px 28px rgba(0,0,0,.45), 0 0 0 1px rgba(80,120,200,.45);
}
html.theme-dark #scheduleActivityModal .modal-body > form > .mb-3 {
  background: linear-gradient(160deg, rgba(18,28,54,.95) 0%, rgba(14,22,44,.95) 100%);
  box-shadow: 0 1px 0 rgba(80,120,200,.1) inset, 0 4px 18px rgba(0,0,0,.35), 0 0 0 1px rgba(55,85,150,.32);
}
html.theme-dark #scheduleActivityModal .modal-footer {
  background: linear-gradient(160deg, #0b1225 0%, #0e1630 100%);
  border-top-color: rgba(55,85,150,.3);
}
html.theme-dark #scheduleActivityModal .modal-footer .btn-sched-close {
  background: linear-gradient(180deg, #162040 0%, #0f1830 100%);
  border-color: rgba(80,110,180,.35);
  color: #a0b8da;
  box-shadow: 0 3px 0 rgba(0,0,0,.4), 0 4px 10px rgba(0,0,0,.25);
}
html.theme-dark #scheduleActivityModal .modal-footer .btn-sched-close:hover {
  background: linear-gradient(180deg, #1d2d55 0%, #14213e 100%);
  border-color: rgba(100,140,210,.5);
  box-shadow: 0 3px 0 rgba(0,0,0,.35), 0 8px 18px rgba(0,0,0,.35);
}
html.theme-dark #scheduleActivityModal .modal-footer .btn-sched-clear {
  background: linear-gradient(180deg, rgba(80,10,10,.7) 0%, rgba(60,5,5,.8) 100%);
  border-color: rgba(200,60,60,.3);
  color: #fca5a5;
  box-shadow: 0 3px 0 rgba(0,0,0,.4), 0 4px 10px rgba(180,30,30,.12);
}
html.theme-dark #scheduleActivityModal .modal-footer .btn-sched-clear:hover {
  background: linear-gradient(180deg, rgba(110,15,15,.8) 0%, rgba(80,8,8,.9) 100%);
  border-color: rgba(220,80,80,.45);
  box-shadow: 0 3px 0 rgba(0,0,0,.35), 0 8px 18px rgba(180,30,30,.25);
}
html.theme-dark #scheduleActivityModal .modal-footer .btn-sched-save {
  box-shadow: 0 4px 0 rgba(15,50,140,.8), 0 6px 22px rgba(37,99,235,.35), inset 0 1px 0 rgba(255,255,255,.18);
}
html.theme-dark #scheduleActivityModal .modal-footer .btn-sched-save:hover {
  box-shadow: 0 4px 0 rgba(15,50,140,.75), 0 10px 30px rgba(37,99,235,.45), inset 0 1px 0 rgba(255,255,255,.22);
}

/* ── Schedule Activity Modal — rich card sections & footer buttons END ────── */

html.theme-dark .btn.btn-view-mode {
  border-color: rgba(100, 141, 211, .86);
  background: linear-gradient(180deg, rgba(20, 40, 74, .9), rgba(13, 27, 52, .9));
  color: #deebff;
  box-shadow: inset 0 1px 0 rgba(151, 177, 219, .12);
}

html.theme-dark .btn.btn-view-mode:hover {
  border-color: rgba(122, 160, 224, .95);
  background: linear-gradient(180deg, rgba(25, 49, 87, .92), rgba(16, 34, 63, .9));
  color: #f0f5ff;
  box-shadow: inset 0 1px 0 rgba(156, 181, 222, .16), 0 8px 16px rgba(3, 11, 29, .42);
}

html.theme-dark .btn.btn-view-mode.is-back {
  border-color: rgba(81, 155, 255, .96);
  background: linear-gradient(180deg, #3e93f7 0%, #2b78de 100%);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(210, 230, 255, .2), 0 8px 16px rgba(5, 16, 39, .42);
}

html.theme-dark .btn.btn-view-mode.is-back:hover {
  border-color: rgba(108, 175, 255, .98);
  background: linear-gradient(180deg, #52a3ff 0%, #3a87ea 100%);
}

html.theme-dark .week-mini-head span {
  color: #b5c8ea;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .66rem;
  font-weight: 700;
}

html.theme-dark .week-mini-row {
  position: relative;
  border-color: rgba(51, 82, 131, .92);
  background: linear-gradient(180deg, rgba(9, 19, 37, .97), rgba(6, 13, 25, .97));
  overflow: hidden;
  border-radius: 12px;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

html.theme-dark .week-mini-row::after {
  display: none;
}

html.theme-dark .week-mini-row:hover {
  border-color: rgba(89, 124, 183, .97);
  background: linear-gradient(180deg, rgba(12, 24, 46, .97), rgba(8, 17, 33, .97));
  box-shadow: inset 0 1px 0 rgba(155, 185, 233, .08);
}

html.theme-dark .week-mini-row.is-active {
  border-color: rgba(107, 140, 190, .95);
  background: linear-gradient(180deg, rgba(16, 31, 56, .97), rgba(10, 21, 39, .97));
  box-shadow: inset 0 0 0 1px rgba(107, 140, 190, .3), 0 12px 22px rgba(4, 13, 31, .5);
}

html.theme-dark .week-mini-title {
  color: #edf4ff;
  font-weight: 700;
}

html.theme-dark .week-mini-range {
  color: #a8bbda;
}

html.theme-dark .day-chip {
  border-color: rgba(57, 86, 132, .9);
  background: linear-gradient(180deg, rgba(12, 24, 45, .95), rgba(8, 17, 33, .95));
  color: #dbe8ff;
  border-radius: 8px;
}

html.theme-dark .day-chip.is-out {
  background: rgba(7, 14, 27, .94);
  color: #8095b9;
}

html.theme-dark .week-mini-row.is-active .week-mini-days {
  gap: 0;
}

html.theme-dark .week-mini-row.is-active .day-chip {
  border-radius: 0;
  background: linear-gradient(180deg, rgba(70, 103, 156, .95), rgba(56, 87, 137, .95));
  border-color: rgba(108, 144, 198, .9);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(191, 210, 236, .2);
}

html.theme-dark .week-mini-row.is-active .day-chip+.day-chip {
  margin-left: -1px;
}

html.theme-dark .week-mini-row.is-active .day-chip:first-child {
  border-top-left-radius: 9px;
  border-bottom-left-radius: 9px;
}

html.theme-dark .week-mini-row.is-active .day-chip:last-child {
  border-top-right-radius: 9px;
  border-bottom-right-radius: 9px;
}

html.theme-dark .week-mini-row.is-active .day-chip.is-out {
  background: linear-gradient(180deg, rgba(52, 73, 106, .9), rgba(42, 62, 92, .9));
  color: #d2e0f8;
}

html.theme-dark .week-selected-info {
  border-color: rgba(93, 126, 176, .84);
  background: linear-gradient(180deg, rgba(9, 21, 41, .95), rgba(7, 16, 32, .95));
  color: #deebff;
}

html.theme-dark #weekStatusCard {
  border-radius: 12px;
  border-width: 1px;
  box-shadow: inset 0 1px 0 rgba(126, 152, 194, .08);
}

html.theme-dark .hint-chip {
  border-color: rgba(62, 90, 136, .8);
  background: rgba(17, 32, 59, .84);
  color: #d0def8;
}

html.theme-dark #map,
html.theme-dark #exec-map {
  border-color: rgba(65, 94, 136, .82);
  box-shadow: 0 8px 16px rgba(2, 9, 24, .44);
}

html.theme-dark .leaflet-control-zoom a {
  background: rgba(13, 30, 60, .96);
  border-color: rgba(62, 92, 136, .82);
  color: #dbe9ff;
}

html.theme-dark .leaflet-control-attribution {
  background: rgba(8, 18, 37, .72);
  color: #8ea4cc;
}

html.theme-dark .dash-stat-card {
  border-color: rgba(55, 82, 126, .76);
  background: linear-gradient(165deg, rgba(9, 20, 40, .82), rgba(7, 14, 27, .84));
  box-shadow: inset 0 1px 0 rgba(125, 153, 205, .08), 0 14px 26px rgba(2, 8, 24, .38);
  transition: transform .22s ease, box-shadow .24s ease, border-color .24s ease;
}

html.theme-dark .dash-stat-card.stat-plan {
  background: linear-gradient(150deg, rgba(38, 72, 133, .92), rgba(24, 46, 86, .94));
}

html.theme-dark .dash-stat-card.stat-transfer {
  background: linear-gradient(150deg, rgba(33, 63, 112, .92), rgba(20, 40, 74, .95));
}

html.theme-dark .dash-stat-card.stat-executed {
  background: linear-gradient(150deg, rgba(32, 96, 152, .92), rgba(17, 52, 82, .95));
}

html.theme-dark .dash-stat-card.stat-approved {
  background: linear-gradient(150deg, rgba(28, 104, 81, .92), rgba(15, 56, 44, .95));
}

html.theme-dark .dash-stat-card::before {
  top: 0;
  right: 0;
  bottom: auto;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0),
      rgba(255, 255, 255, .42),
      rgba(255, 255, 255, 0));
  background-size: 200% 100%;
  background-position: -130% 50%;
}

html.theme-dark .dash-stat-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(112deg,
      rgba(255, 255, 255, 0) 22%,
      rgba(255, 255, 255, .22) 48%,
      rgba(255, 255, 255, 0) 66%);
  opacity: 0;
  transform: translateX(-160%) skewX(-16deg);
}

html.theme-dark .dash-stat-icon {
  color: #dce9ff;
  background: rgba(52, 81, 126, .56);
  border-color: rgba(91, 123, 176, .62);
  box-shadow: none;
}

@keyframes dashIconFloat {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }

  25% {
    transform: translate3d(0, -1px, 0) rotate(-4deg);
  }

  50% {
    transform: translate3d(0, -3px, 0) rotate(0deg);
  }

  75% {
    transform: translate3d(0, -1px, 0) rotate(4deg);
  }

  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
}

html.theme-dark .dashboard-home-page .dash-stat-card .dash-stat-icon i {
  animation: dashIconFloat 3.2s ease-in-out infinite;
}

html.theme-dark .dashboard-home-page .dash-stat-card.stat-plan .dash-stat-icon i {
  animation-duration: 3.1s;
  animation-delay: 0s;
}

html.theme-dark .dashboard-home-page .dash-stat-card.stat-transfer .dash-stat-icon i {
  animation-duration: 3.35s;
  animation-delay: .35s;
}

html.theme-dark .dashboard-home-page .dash-stat-card.stat-executed .dash-stat-icon i {
  animation-duration: 3.6s;
  animation-delay: .52s;
}

html.theme-dark .dashboard-home-page .dash-stat-card.stat-approved .dash-stat-icon i {
  animation-duration: 3.25s;
  animation-delay: .24s;
}

@media (hover: hover) and (pointer: fine) {
  html.theme-dark .dashboard-home-page .dash-stat-card:hover {
    border-color: rgba(158, 185, 236, .9);
    box-shadow:
      inset 0 1px 0 rgba(196, 214, 246, .14),
      0 18px 34px rgba(2, 9, 24, .48);
    transform: translateY(-2px);
  }

  html.theme-dark .dashboard-home-page .dash-stat-card:hover::before {
    animation: dark-card-top-glint .72s ease-out 1;
  }

  html.theme-dark .dashboard-home-page .dash-stat-card:hover::after {
    animation: dark-card-sweep .82s cubic-bezier(.18, .72, .28, 1) 1;
  }

  html.theme-dark .dashboard-home-page .dash-stat-card:hover .dash-stat-icon i {
    animation-duration: 2.35s;
  }
}

@media (prefers-reduced-motion: reduce) {

  html:not(.theme-dark) .app-shell::before,
  html:not(.theme-dark) .app-shell::after {
    animation: none;
  }

  .app-shell-topnav::before,
  .app-shell-topnav::after {
    animation: none;
  }

  .app-main-topnav::before {
    animation: none;
  }

  .app-main-topnav::after {
    animation: none;
  }

  html.theme-dark .dashboard-home-page .dash-stat-card .dash-stat-icon i {
    animation: none;
  }
}

html.theme-dark .dash-stat-card .dash-stat-label {
  color: #95acd1;
}

html.theme-dark .dash-stat-card .dash-stat-value {
  color: #eaf2ff;
}

html.theme-dark .dash-stat-card .dash-stat-meta {
  color: #a8bcdf;
}

html.theme-dark .dash-day-cell {
  border-right-color: rgba(49, 76, 120, .86);
  border-bottom-color: rgba(49, 76, 120, .86);
  background: linear-gradient(180deg, rgba(10, 21, 42, .92), rgba(8, 16, 31, .94));
}

html.theme-dark .dash-day-cell:hover {
  background: rgba(18, 33, 59, .92);
  box-shadow: inset 0 0 0 1px rgba(87, 121, 176, .52);
}

html.theme-dark .dash-day-cell.is-out {
  opacity: .42;
}

html.theme-dark .dash-day-cell.is-selected {
  background: rgba(19, 37, 66, .95);
  box-shadow: inset 0 0 0 2px rgba(96, 131, 191, .56);
}

html.theme-dark .dash-day-num {
  color: #d8e6ff;
}

html.theme-dark .dash-day-count {
  color: #dceaff;
  background: rgba(73, 108, 169, .32);
  border-color: rgba(95, 129, 189, .62);
}

html.theme-dark .dash-day-event.is-planned {
  color: #d9e7ff;
  background: rgba(60, 96, 158, .46);
}

html.theme-dark .dash-day-event.is-executed {
  color: #ccffe9;
  background: rgba(22, 122, 90, .44);
}

html.theme-dark .dash-day-event.is-relegada {
  color: #ffd9cc;
  background: rgba(154, 74, 42, .46);
}

html.theme-dark .dash-day-more {
  color: #96afd6;
}

html.theme-dark .dash-context-menu {
  border-color: rgba(81, 101, 136, .82);
  background: linear-gradient(180deg, rgba(23, 30, 43, .98), rgba(16, 22, 33, .98));
  box-shadow: 0 18px 36px rgba(2, 10, 24, .58), 0 1px 0 rgba(175, 193, 223, .08) inset;
}

html.theme-dark .dash-context-menu::after {
  background: linear-gradient(135deg, rgba(18, 24, 35, .98), rgba(13, 19, 29, .98));
  border-right-color: rgba(81, 101, 136, .82);
  border-bottom-color: rgba(81, 101, 136, .82);
}

html.theme-dark .dash-context-title {
  color: #dee8fb;
}

html.theme-dark .dash-context-title i {
  color: #dee8fb;
}

html.theme-dark .dash-context-divider {
  background: rgba(114, 136, 174, .36);
}

html.theme-dark .dash-context-item {
  color: #dce8ff;
}

html.theme-dark .dash-context-item:hover {
  background: rgba(58, 77, 108, .52);
  color: #eef5ff;
}

html.theme-dark .dash-day-modal-content {
  border-color: rgba(67, 97, 142, .82);
  background: linear-gradient(180deg, rgba(11, 21, 39, .96), rgba(8, 16, 30, .96));
}

html.theme-dark #dashDayActivitiesModal .modal-header,
html.theme-dark #dashDayActivitiesModal .modal-footer {
  border-color: rgba(67, 97, 142, .7);
  background: rgba(13, 24, 43, .74);
}

html.theme-dark #dashDayActivitiesModal .modal-title {
  color: #e3efff;
}

html.theme-dark .dash-day-modal-date {
  color: #a7bfde;
}

html.theme-dark .dash-day-modal-empty {
  border-color: rgba(71, 102, 148, .78);
  background: rgba(17, 31, 54, .8);
  color: #a6bedf !important;
}

html.theme-dark .dash-day-modal-item {
  border-color: rgba(68, 98, 143, .76);
  border-left-color: rgba(101, 135, 198, .86);
  background: linear-gradient(180deg, rgba(14, 27, 49, .92), rgba(9, 18, 34, .92));
}

html.theme-dark .dash-day-modal-item.is-executed {
  border-left-color: rgba(81, 179, 141, .88);
}

html.theme-dark .dash-day-modal-item.is-relegada {
  border-left-color: rgba(203, 109, 76, .86);
}

html.theme-dark .dash-day-modal-time {
  color: #9db8df;
}

html.theme-dark .dash-day-modal-client {
  color: #e6f0ff;
}

html.theme-dark .dash-day-modal-meta {
  color: #abc2e3;
}

html.theme-dark .dash-day-modal-pill {
  color: #bfe9d8;
  background: rgba(19, 89, 68, .66);
  border-color: rgba(64, 155, 120, .68);
}

html.theme-dark .dash-day-modal-item.is-planned .dash-day-modal-pill {
  color: #c7dcff;
  background: rgba(32, 58, 101, .7);
  border-color: rgba(90, 128, 192, .68);
}

html.theme-dark .dash-day-modal-item.is-relegada .dash-day-modal-pill {
  color: #ffd3c4;
  background: rgba(98, 40, 24, .72);
  border-color: rgba(177, 83, 56, .68);
}

html.theme-dark .dash-day-modal-pill.is-closed {
  color: #c2d3ef;
  background: rgba(32, 49, 80, .72);
  border-color: rgba(82, 108, 154, .6);
}

html.theme-dark .dash-day-event.can-execute {
  border-color: rgba(96, 132, 192, .56);
}

html.theme-dark .dash-day-event.can-execute:hover {
  box-shadow: inset 0 0 0 1px rgba(112, 148, 208, .46);
}

html.theme-dark .dash-calendar-title {
  color: #e5efff;
}

html.theme-dark .dash-calendar-toolbar {
  background: linear-gradient(180deg, rgba(27, 48, 81, .86), rgba(14, 29, 54, .84));
  border-bottom-color: rgba(73, 104, 154, .72);
}

html.theme-dark .dash-calendar-shell {
  border-color: rgba(61, 91, 136, .86);
  background: linear-gradient(180deg, rgba(9, 20, 40, .88), rgba(7, 15, 29, .9));
}

html.theme-dark .dash-calendar-shell .dash-calendar-head {
  border-bottom-color: rgba(61, 91, 136, .86);
}

html.theme-dark .dash-calendar-head span {
  color: #9db4da;
}

html.theme-dark .dash-analytics-card.analytics-client .card-header {
  background: linear-gradient(180deg, rgba(52, 84, 136, .35), rgba(52, 84, 136, .12));
  border-bottom-color: rgba(73, 105, 154, .62);
}

html.theme-dark .dash-analytics-card {
  border-color: rgba(56, 84, 127, .78);
  background: linear-gradient(160deg, rgba(10, 22, 42, .86), rgba(7, 15, 29, .9));
}

html.theme-dark .dash-analytics-card:hover {
  border-color: rgba(88, 121, 176, .82);
  box-shadow: 0 14px 24px rgba(2, 10, 28, .52);
}

html.theme-dark .dash-analytics-card::after {
  opacity: .7;
}

html.theme-dark .dash-analytics-card.analytics-week .card-header {
  background: linear-gradient(180deg, rgba(50, 70, 112, .36), rgba(50, 70, 112, .12));
  border-bottom-color: rgba(72, 94, 136, .62);
}

html.theme-dark .dash-analytics-card.analytics-advisor .card-header {
  background: linear-gradient(180deg, rgba(21, 99, 88, .38), rgba(21, 99, 88, .12));
  border-bottom-color: rgba(44, 121, 109, .62);
}

html.theme-dark .dash-analytics-card.analytics-rubro .card-header {
  background: linear-gradient(180deg, rgba(79, 64, 125, .4), rgba(79, 64, 125, .14));
  border-bottom-color: rgba(100, 82, 150, .62);
}

html.theme-dark .dash-list-item {
  border-color: rgba(50, 77, 120, .82);
  background: linear-gradient(180deg, rgba(10, 20, 39, .84), rgba(7, 15, 30, .84));
}

html.theme-dark .dash-list-item.can-execute:hover {
  border-color: rgba(92, 123, 174, .9);
  box-shadow: 0 10px 16px rgba(2, 10, 27, .46);
}

html.theme-dark .dash-list-item .dash-list-time {
  color: #9cb4da;
}

html.theme-dark .dash-list-item .dash-list-title {
  color: #e5efff;
}

html.theme-dark .dash-list-item .dash-list-meta {
  color: #9cb4da;
}

html.theme-dark .dash-dist-item {
  border-color: rgba(64, 97, 144, .78);
  background: linear-gradient(180deg, rgba(10, 21, 39, .82), rgba(8, 16, 30, .8));
  box-shadow: inset 0 1px 0 rgba(92, 126, 181, .1);
}

html.theme-dark .dash-dist-label {
  color: #bfd4f8;
}

html.theme-dark .dash-dist-value {
  color: #e8f1ff;
}

html.theme-dark .dash-dist-track {
  background: rgba(82, 117, 176, .22);
}

html.theme-dark .dash-dist-fill {
  background: linear-gradient(90deg, #3d6cff 0%, #41b2ff 100%);
}

html.theme-dark .dash-week-grid-head {
  color: #9eb5da;
  border-bottom-color: rgba(74, 103, 148, .58);
}

html.theme-dark .dash-week-compact-wrap {
  border-color: rgba(63, 92, 136, .72);
  background: linear-gradient(180deg, rgba(15, 29, 52, .9), rgba(10, 20, 38, .88));
  box-shadow: inset 0 1px 0 rgba(125, 159, 214, .12), 0 8px 20px rgba(2, 10, 24, .35);
}

html.theme-dark .dash-week-compact-table thead th {
  border-bottom-color: rgba(64, 94, 139, .8);
  background: linear-gradient(180deg, rgba(20, 35, 62, .88), rgba(15, 28, 51, .86));
  color: #abc3e9;
}

html.theme-dark .dash-week-col-chip {
  border-color: rgba(81, 114, 166, .58);
  background: linear-gradient(180deg, rgba(26, 41, 68, .96), rgba(16, 28, 49, .92));
  color: #bfd5ff;
}

html.theme-dark .dash-week-col-chip.is-fuel {
  color: #7eaefe;
  background: linear-gradient(180deg, rgba(31, 56, 102, .88), rgba(21, 39, 71, .86));
  border-color: rgba(81, 125, 198, .66);
}

html.theme-dark .dash-week-col-chip.is-peaje {
  color: #bfb2ff;
  background: linear-gradient(180deg, rgba(52, 42, 101, .88), rgba(34, 29, 72, .86));
  border-color: rgba(120, 110, 190, .66);
}

html.theme-dark .dash-week-col-chip.is-food {
  color: #9ae9d2;
  background: linear-gradient(180deg, rgba(23, 68, 62, .88), rgba(14, 49, 46, .86));
  border-color: rgba(78, 156, 133, .66);
}

html.theme-dark .dash-week-col-chip.is-hotel {
  color: #f4c893;
  background: linear-gradient(180deg, rgba(73, 52, 31, .88), rgba(56, 40, 24, .86));
  border-color: rgba(149, 110, 70, .66);
}

html.theme-dark .dash-week-col-chip.is-extra {
  color: #f5b3ac;
  background: linear-gradient(180deg, rgba(79, 36, 35, .88), rgba(58, 27, 27, .86));
  border-color: rgba(157, 83, 79, .66);
}

html.theme-dark .dash-week-col-chip.is-total {
  color: #9bc2ff;
  background: linear-gradient(180deg, rgba(34, 57, 95, .9), rgba(22, 38, 66, .88));
  border-color: rgba(90, 127, 188, .66);
}

html.theme-dark .dash-week-compact-table tbody th {
  border-top-color: rgba(60, 89, 132, .62);
  background: rgba(18, 33, 58, .74);
  color: #d3e2fc;
}

html.theme-dark .dash-week-compact-table tbody td {
  border-top-color: rgba(60, 89, 132, .62);
  color: #d8e7ff;
}

html.theme-dark .dash-week-compact-table tbody tr.is-plan td {
  background: rgba(15, 30, 55, .72);
}

html.theme-dark .dash-week-compact-table tbody tr.is-transfer td {
  background: rgba(35, 28, 67, .72);
}

html.theme-dark .dash-week-compact-table tbody tr.is-exec td {
  background: rgba(13, 43, 38, .62);
}

html.theme-dark .dash-week-compact-table tbody tr.is-approved td {
  background: rgba(14, 52, 42, .68);
}

html.theme-dark .dash-week-compact-table tbody tr.is-plan th {
  border-left-color: rgba(109, 144, 209, .86);
}

html.theme-dark .dash-week-compact-table tbody tr.is-transfer th {
  border-left-color: rgba(142, 118, 214, .86);
}

html.theme-dark .dash-week-compact-table tbody tr.is-exec th {
  border-left-color: rgba(90, 181, 146, .86);
}

html.theme-dark .dash-week-compact-table tbody tr.is-approved th {
  border-left-color: rgba(88, 183, 141, .86);
}

html.theme-dark .dash-week-compact-table tbody td.is-total,
html.theme-dark .dash-week-compact-table tbody tr.is-plan td.is-total,
html.theme-dark .dash-week-compact-table tbody tr.is-transfer td.is-total,
html.theme-dark .dash-week-compact-table tbody tr.is-exec td.is-total,
html.theme-dark .dash-week-compact-table tbody tr.is-approved td.is-total {
  color: #f0f6ff;
  background: rgba(29, 53, 93, .9);
}

html.theme-dark .dash-week-filter-group .form-label {
  color: #93abd3;
}

html.theme-dark .dash-week-filter-group .form-select {
  border-color: rgba(66, 96, 140, .82);
  background: linear-gradient(180deg, rgba(18, 31, 54, .94), rgba(13, 23, 42, .9));
  color: #dbe9ff;
}

html.theme-dark .dash-week-filter-group .form-select:focus {
  border-color: rgba(96, 132, 189, .9);
  box-shadow: 0 0 0 0.15rem rgba(73, 112, 180, .25);
}

html.theme-dark .dash-week-row {
  border-color: rgba(56, 86, 130, .72);
  background: linear-gradient(180deg, rgba(11, 22, 42, .72), rgba(8, 16, 30, .72));
}

html.theme-dark .dash-week-row-label {
  color: #cfdef8;
}

html.theme-dark .dash-week-row-icon {
  border-color: rgba(79, 112, 166, .62);
  background: linear-gradient(180deg, rgba(24, 39, 66, .92), rgba(16, 28, 49, .9));
  color: #c9dbff;
}

html.theme-dark .dash-week-row-icon.is-fuel {
  color: #79a8ff;
}

html.theme-dark .dash-week-row-icon.is-peaje {
  color: #b7a8ff;
}

html.theme-dark .dash-week-row-icon.is-food {
  color: #7fd9c0;
}

html.theme-dark .dash-week-row-icon.is-hotel {
  color: #f0bf8e;
}

html.theme-dark .dash-week-row-icon.is-extra {
  color: #f0a29b;
}

html.theme-dark .dash-week-row-icon.is-total {
  color: #9bc2ff;
}

html.theme-dark .dash-week-row-value {
  color: #e7f0ff;
}

html.theme-dark .dash-week-row-value[data-kind="plan"]::before {
  color: #9bb7ea;
  border-color: rgba(83, 118, 177, .64);
  background: rgba(20, 35, 62, .76);
}

html.theme-dark .dash-week-row-value[data-kind="exec"]::before {
  color: #95d9c8;
  border-color: rgba(63, 126, 107, .68);
  background: rgba(14, 57, 49, .7);
}

html.theme-dark .dash-week-row-label.is-total,
html.theme-dark .dash-week-row-value.is-total {
  border-top-color: rgba(74, 103, 148, .58);
  color: #f0f6ff;
}

html.theme-dark .dash-week-diff-badge {
  border-color: rgba(74, 102, 146, .62);
  background: rgba(22, 37, 64, .84);
  color: #bdd3f8;
}

html.theme-dark .dash-week-diff-badge.is-positive {
  color: #ffccbe;
  background: rgba(95, 34, 24, .7);
  border-color: rgba(158, 72, 50, .68);
}

html.theme-dark .dash-week-diff-badge.is-negative {
  color: #cbffe9;
  background: rgba(17, 78, 56, .68);
  border-color: rgba(35, 123, 90, .7);
}

html.theme-dark .dash-week-diff-badge.is-neutral {
  color: #bad2fa;
  background: rgba(23, 39, 68, .78);
}

html.theme-dark .dash-week-table-wrap {
  border-top-color: rgba(63, 92, 136, .72);
}

html.theme-dark #dashApproveWeekBtn.is-disabled {
  opacity: .62;
  border-color: rgba(84, 112, 160, .68);
  color: #9fb5da;
  background: rgba(24, 37, 60, .82);
}

html.theme-dark .dash-week-summary-tools .dash-lift-btn {
  border-color: rgba(96, 132, 189, .72);
  background: linear-gradient(180deg, rgba(44, 66, 106, .96), rgba(29, 48, 84, .98));
  color: #d6e6ff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.1),
    0 2px 0 rgba(22, 33, 58, .72),
    0 14px 24px rgba(0, 0, 0, .24);
}

html.theme-dark .dash-week-summary-tools .dash-lift-btn::before {
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,0));
}

html.theme-dark .dash-week-summary-tools .dash-lift-btn:hover {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 2px 0 rgba(22, 33, 58, .72),
    0 16px 26px rgba(0, 0, 0, .3);
}

html.theme-dark .dash-week-summary-tools .dash-lift-btn.dash-lift-btn-print {
  border-color: rgba(63, 147, 255, .72);
  background: linear-gradient(180deg, #2384f2 0%, #1664d1 100%);
  color: #fff;
}

html.theme-dark .dash-week-summary-tools .dash-lift-btn.dash-lift-btn-neutral {
  border-color: rgba(104, 133, 182, .72);
  background: linear-gradient(180deg, rgba(55, 77, 118, .96), rgba(34, 52, 86, .98));
  color: #deebff;
}

html.theme-dark .dash-week-table thead th {
  border-bottom-color: rgba(64, 94, 139, .8);
  background: linear-gradient(180deg, rgba(20, 35, 62, .88), rgba(15, 28, 51, .86));
  color: #abc3e9;
}

html.theme-dark .dash-week-table tbody td {
  border-top-color: rgba(60, 89, 132, .62);
  color: #d8e7ff;
  background: rgba(11, 21, 40, .6);
}

html.theme-dark .dash-week-table tbody tr:hover td {
  background: rgba(21, 38, 66, .72);
}

html.theme-dark .dash-week-table tbody tr.dash-week-total-row td {
  background: linear-gradient(180deg, rgba(18, 33, 58, .95), rgba(13, 24, 45, .92));
  border-top-color: rgba(86, 120, 176, .72);
  color: #e5efff;
}

html.theme-dark .dash-week-table tbody tr.dash-week-group-row td {
  background: linear-gradient(180deg, rgba(19, 34, 60, .95), rgba(14, 26, 48, .92));
  border-top-color: rgba(72, 104, 151, .72);
  color: #e4efff;
}

html.theme-dark .dash-week-table tbody tr.dash-week-group-row:hover td {
  background: linear-gradient(180deg, rgba(25, 44, 78, .96), rgba(17, 33, 60, .94));
}

html.theme-dark .dash-week-table tbody tr.dash-week-group-child-row td {
  background: rgba(12, 22, 41, .78);
}

html.theme-dark .dash-week-table tbody tr.dash-week-group-child-row:hover td {
  background: rgba(18, 34, 61, .84);
}

html.theme-dark .dash-week-group-toggle {
  border-color: rgba(90, 126, 186, .7);
  background: linear-gradient(180deg, rgba(23, 41, 74, .95), rgba(15, 29, 54, .92));
  color: #cfe1ff;
}

html.theme-dark .dash-week-group-title {
  color: #e6f0ff;
}

html.theme-dark .dash-week-group-meta {
  color: #9cb6de;
}

html.theme-dark .dash-week-group-child-label {
  color: #b9ceee;
}

html.theme-dark .dash-week-group-child-dot {
  background: #85b2ff;
  box-shadow: 0 0 0 3px rgba(133, 178, 255, .16);
}

html.theme-dark .dash-week-inline-approve.is-disabled {
  opacity: .58;
  box-shadow: none;
}


html.theme-dark .dash-day-table-wrap {
  border-top-color: rgba(63, 92, 136, .72);
}

html.theme-dark .dash-day-table thead th {
  border-bottom-color: rgba(64, 94, 139, .8);
  background: linear-gradient(180deg, rgba(20, 35, 62, .88), rgba(15, 28, 51, .86));
  color: #abc3e9;
}

html.theme-dark .dash-day-table tbody td {
  border-top-color: rgba(60, 89, 132, .62);
  color: #d8e7ff;
  background: rgba(11, 21, 40, .58);
}

html.theme-dark .dash-day-table tbody tr:hover td {
  background: rgba(21, 38, 66, .72);
}

html.theme-dark .dash-state-pill.is-planificada {
  background: rgba(56, 98, 171, .34);
  border-color: rgba(79, 120, 184, .68);
  color: #d5e6ff;
}

html.theme-dark .dash-state-pill.is-ejecutada {
  background: rgba(24, 120, 86, .36);
  border-color: rgba(44, 140, 104, .7);
  color: #cbffe7;
}

html.theme-dark .dash-state-pill.is-relegada {
  background: rgba(127, 58, 36, .44);
  border-color: rgba(160, 81, 58, .74);
  color: #ffd7c8;
}

html.theme-dark .dash-day-action-btn {
  border-color: rgba(88, 124, 184, .78);
  color: #d3e3ff;
}

html.theme-dark .dash-day-action-btn:hover {
  background: rgba(56, 94, 158, .35);
  border-color: rgba(104, 141, 200, .88);
  color: #eef5ff;
}

html.theme-dark .dash-liquid-status {
  border-color: rgba(59, 90, 137, .76);
  background: linear-gradient(180deg, rgba(12, 22, 42, .86), rgba(9, 17, 34, .88));
}

html.theme-dark .dash-liquid-status.is-open {
  border-color: rgba(71, 112, 174, .8);
  background: linear-gradient(180deg, rgba(16, 30, 56, .88), rgba(12, 23, 42, .9));
}

html.theme-dark .dash-liquid-status.is-overdue {
  border-color: rgba(151, 86, 67, .82);
  background: linear-gradient(180deg, rgba(53, 27, 25, .82), rgba(42, 21, 20, .84));
}

html.theme-dark .dash-liquid-status.is-closed {
  border-color: rgba(56, 126, 88, .82);
  background: linear-gradient(180deg, rgba(19, 50, 37, .86), rgba(13, 37, 29, .88));
}

html.theme-dark .dash-liquid-title {
  color: #dce9ff;
}

html.theme-dark .dash-liquid-meta {
  color: #9bb2d7;
}

html.theme-dark .dash-liquid-countdown {
  background: rgba(39, 67, 113, .56);
  border-color: rgba(77, 111, 170, .72);
  color: #e7f0ff;
}

html.theme-dark .dash-liquid-status.is-open .dash-liquid-countdown {
  background: linear-gradient(180deg, rgba(44, 73, 122, .76), rgba(30, 56, 100, .74));
  border-color: rgba(98, 142, 209, .78);
  color: #eaf3ff;
}

html.theme-dark .dash-liquid-status.is-overdue .dash-liquid-countdown {
  background: linear-gradient(180deg, rgba(98, 46, 39, .78), rgba(73, 31, 28, .76));
  border-color: rgba(187, 99, 79, .82);
  color: #ffe3dd;
}

html.theme-dark .dash-liquid-status.is-closed .dash-liquid-countdown {
  background: linear-gradient(180deg, rgba(28, 74, 54, .78), rgba(20, 58, 42, .76));
  border-color: rgba(77, 168, 122, .82);
  color: #d8ffed;
}

html.theme-dark .dash-approval-pill {
  background: rgba(31, 117, 84, .34);
  border-color: rgba(49, 139, 104, .7);
  color: #bcf9df;
}

html.theme-dark .dash-approval-pill.is-pending {
  background: rgba(108, 71, 25, .62);
  border-color: rgba(168, 118, 53, .74);
  color: #ffe1b3;
}

html.theme-dark .dash-approval-pill.is-positive {
  background: rgba(95, 34, 24, .7);
  border-color: rgba(160, 74, 52, .76);
  color: #ffd5c7;
}

html.theme-dark .dash-approval-pill.is-negative {
  background: rgba(19, 84, 61, .7);
  border-color: rgba(43, 129, 95, .74);
  color: #cbffe9;
}

html.theme-dark .dash-approval-pill.is-neutral {
  background: rgba(28, 47, 80, .72);
  border-color: rgba(81, 112, 166, .74);
  color: #cfe0ff;
}

html.theme-dark .dash-approval-value {
  color: #a9c3f2;
}

html.theme-dark .dash-order-chip {
  border-color: rgba(73, 102, 148, .72);
  background: rgba(18, 32, 57, .82);
  color: #c6dafc;
}

html.theme-dark .dash-order-chip.is-missing {
  border-color: rgba(156, 94, 69, .76);
  background: rgba(62, 31, 29, .8);
  color: #ffd2bf;
}

html.theme-dark .dash-approval-modal-content {
  border-color: rgba(67, 97, 142, .82);
  background: linear-gradient(180deg, rgba(11, 21, 39, .96), rgba(8, 16, 30, .96));
}

html.theme-dark #dashApprovalModal .modal-header,
html.theme-dark #dashApprovalModal .modal-footer {
  border-color: rgba(67, 97, 142, .7);
  background: rgba(13, 24, 43, .74);
}

html.theme-dark .dash-week-breakdown-modal-content .modal-header,
html.theme-dark .dash-week-breakdown-modal-content .modal-footer {
  border-color: rgba(67, 97, 142, .7);
  background: rgba(13, 24, 43, .74);
}

html.theme-dark #dashApprovalModal .modal-title {
  color: #e3efff;
}

html.theme-dark .dash-week-breakdown-meta {
  color: #a7bfde;
}

html.theme-dark .dash-approval-modal-meta {
  color: #a7bfde;
}

html.theme-dark .dash-approval-modal-plan {
  border-color: rgba(71, 102, 148, .78);
  background: rgba(17, 31, 54, .8);
  color: #a6bedf;
}

html.theme-dark .dash-week-breakdown-wrap {
  border-color: rgba(71, 102, 148, .78);
  background: rgba(11, 22, 39, .92);
}

html.theme-dark .dash-week-breakdown-note {
  color: #a6bedf;
}

html.theme-dark .dash-charts-row .dash-chart-card .card-body {
  background: linear-gradient(180deg, rgba(9, 18, 35, .6), rgba(7, 14, 28, .64));
}

html.theme-dark .dash-finance-line {
  border-bottom-color: rgba(74, 103, 148, .5);
}

html.theme-dark .dash-finance-line span {
  color: #9eb3d8;
}

html.theme-dark .dash-finance-line strong {
  color: #e6f0ff;
}

/* ==========================================================
   Holographic Dark Mode Polish (no structural changes)
   ========================================================== */

@keyframes dark-holo-bloom {
  0% {
    transform: translate3d(-3%, -2%, 0) scale(1);
    opacity: .42;
  }

  50% {
    transform: translate3d(2%, 1%, 0) scale(1.04);
    opacity: .56;
  }

  100% {
    transform: translate3d(1%, 3%, 0) scale(1.08);
    opacity: .46;
  }
}

@keyframes dark-holo-grid-shift {
  from {
    background-position: -120vw 0, -80vw 0;
  }

  to {
    background-position: 120vw 0, 160vw 0;
  }
}

@keyframes dark-holo-foil {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 220% 50%;
  }
}

@keyframes dark-card-top-glint {
  from {
    background-position: -140% 50%;
  }

  to {
    background-position: 180% 50%;
  }
}

@keyframes dark-card-sweep {
  0% {
    opacity: 0;
    transform: translateX(-145%) skewX(-16deg);
  }

  20% {
    opacity: .22;
  }

  65% {
    opacity: .12;
  }

  100% {
    opacity: 0;
    transform: translateX(155%) skewX(-16deg);
  }
}

html.theme-dark body:not(.login-page) {
  background: #040911;
}

html.theme-dark body:not(.login-page)::before {
  inset: 0;
  background:
    radial-gradient(circle at 18% 28%, rgba(0, 224, 255, .2) 0%, transparent 42%),
    radial-gradient(circle at 82% 72%, rgba(82, 214, 255, .14) 0%, transparent 46%),
    radial-gradient(circle at 50% 52%, rgba(14, 22, 36, .95) 0%, #040911 100%);
  filter: blur(44px) saturate(112%);
  opacity: .62;
  animation: login-aerosol-drift 20s ease-in-out infinite alternate;
}

html.theme-dark body:not(.login-page)::after {
  inset: -10%;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .08) 0%, transparent 68%),
    linear-gradient(118deg, rgba(149, 198, 255, .12), transparent 35%, rgba(3, 8, 17, .82));
  mix-blend-mode: screen;
  filter: blur(8px);
  opacity: .22;
  animation: ambient-wave 20s ease-in-out infinite alternate;
}

html.theme-dark .topbar,
html.theme-dark .top-nav-menu,
html.theme-dark .app-sidebar {
  background-color: rgba(4, 9, 20, .72);
  border-color: rgba(174, 198, 240, .14);
  backdrop-filter: blur(14px) saturate(130%);
}

html.theme-dark .cloud-card {
  border-color: rgba(198, 215, 246, .22);
  background:
    linear-gradient(140deg, rgba(255, 255, 255, .09) 0%, rgba(255, 255, 255, .02) 44%, rgba(255, 255, 255, .04) 100%),
    rgba(6, 12, 26, .84);
  box-shadow:
    0 24px 52px rgba(0, 0, 0, .46),
    inset 0 1px 0 rgba(223, 234, 255, .2),
    inset 0 -1px 0 rgba(4, 9, 20, .56);
  backdrop-filter: blur(20px) saturate(140%);
  transition: border-color .24s ease, box-shadow .24s ease, transform .24s ease;
}

html.theme-dark .cloud-card::before {
  height: 1px;
  background:
    linear-gradient(90deg,
      rgba(255, 255, 255, 0),
      rgba(255, 255, 255, .45),
      rgba(255, 255, 255, 0));
  background-size: 200% 100%;
  background-position: -130% 50%;
  animation: none;
}

html.theme-dark .cloud-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(112deg,
      rgba(255, 255, 255, 0) 22%,
      rgba(255, 255, 255, .24) 48%,
      rgba(255, 255, 255, 0) 66%);
  opacity: 0;
  transform: translateX(-160%) skewX(-16deg);
}

html.theme-dark .cloud-card:hover {
  border-color: rgba(198, 215, 246, .38);
  box-shadow:
    0 30px 56px rgba(0, 0, 0, .54),
    inset 0 1px 0 rgba(223, 234, 255, .28),
    inset 0 -1px 0 rgba(4, 9, 20, .62);
  transform: translateY(-2px);
}

@media (hover: hover) and (pointer: fine) {
  html.theme-dark .cloud-card:hover::before {
    animation: dark-card-top-glint .72s ease-out 1;
  }

  html.theme-dark .cloud-card:hover::after {
    animation: dark-card-sweep .82s cubic-bezier(.18, .72, .28, 1) 1;
  }
}

html.theme-dark .card-header,
html.theme-dark .cloud-card .card-header {
  background: linear-gradient(180deg, rgba(14, 30, 68, .88) 0%, rgba(8, 18, 44, .86) 100%);
  border-bottom-color: rgba(160, 196, 252, .14);
}

html.theme-dark .btn-primary,
html.theme-dark .btn-success {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  transition: transform .2s ease, filter .2s ease, box-shadow .2s ease;
}

html.theme-dark .btn-primary::before,
html.theme-dark .btn-success::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 -130%;
  width: 70%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .34), transparent);
  transition: left .46s ease;
}

html.theme-dark .btn-primary:hover,
html.theme-dark .btn-success:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

html.theme-dark .btn-primary:hover::before,
html.theme-dark .btn-success:hover::before {
  left: 130%;
}

html.theme-dark .metric-card,
html.theme-dark .summary-pill {
  border-color: rgba(93, 122, 176, .72);
  box-shadow:
    inset 0 1px 0 rgba(190, 206, 236, .08),
    0 12px 26px rgba(3, 11, 28, .46);
}

@media (max-width: 1199.98px) {
  .topbar-nav-layout {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 10px;
    padding: 10px 12px;
  }

  .top-nav-menu-final {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(100%, 360px);
  }

  .top-nav-menu-final .action-link {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    justify-content: center;
    padding: 0 10px;
  }

  .top-nav-menu-final .link-title {
    max-width: 140px;
    opacity: 1;
  }

  .topbar-actions {
    gap: 8px;
    justify-content: flex-end;
  }

  .topbar-theme-toggle {
    padding: .28rem .48rem .28rem .32rem;
  }

  .topbar-theme-toggle .theme-toggle-text,
  .topbar-user-role {
    display: none;
  }

  .topbar-user-trigger {
    gap: 8px;
    padding: 6px 10px 6px 6px;
  }

  .topbar-user-name {
    max-width: 108px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .content-wrap {
    padding: 10px;
  }

  .planning-unified-page .planning-mini-dashboard .card-header {
    padding: 12px 14px;
  }

  .planning-unified-page .planning-mini-dashboard .card-body {
    padding: 12px 14px 16px;
  }

  .planning-mini-dashboard-title h6 {
    font-size: .95rem;
  }

  .planning-admin-summary-meta {
    align-items: flex-start;
    text-align: left;
  }

  .planning-admin-summary-week,
  .planning-admin-mini-calendar-week {
    font-size: .86rem;
  }

  .planning-admin-summary-filter,
  .planning-admin-mini-calendar-filter,
  .planning-admin-mini-calendar-note {
    font-size: .7rem;
  }

  .planning-mini-dashboard .planning-mini-stat {
    min-height: 82px;
    padding: 11px 12px;
  }

  .planning-mini-dashboard .planning-mini-stat .dash-stat-label {
    font-size: .63rem;
  }

  .planning-mini-dashboard .planning-mini-stat .dash-stat-value {
    font-size: 1.12rem;
  }

  .planning-mini-dashboard .planning-mini-stat .dash-stat-meta {
    font-size: .69rem;
  }

  .dash-week-summary-tools {
    width: 100%;
    justify-content: flex-start;
  }

  .dash-week-table {
    font-size: .77rem;
  }

  .dash-week-table thead th {
    font-size: .62rem;
    letter-spacing: .035em;
  }

  .planning-unified-page.is-admin-home .planning-admin-summary-card .card-header,
  .planning-unified-page .planning-admin-week-card .card-header {
    gap: 10px;
  }
}

@media (max-width: 991.98px) {
  .app-shell-topnav {
    padding: 8px;
  }

  .topbar-nav-layout {
    grid-template-columns: 1fr auto;
    row-gap: 10px;
    padding: 10px 12px;
  }

  .top-nav-menu {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(100%, 300px);
  }

  .top-nav-menu-final {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(100%, 260px);
  }

  .top-nav-menu-final .action-link {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    justify-content: center;
    padding: 0 10px;
  }

  .top-nav-menu-final .link-title {
    max-width: 140px;
    opacity: 1;
  }

  .gastos-side-panel {
    margin-top: 6px;
  }

  .gastos-top-cards-pane .metric-card,
  .gastos-top-cards-pane .summary-pill {
    min-height: 82px;
  }

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

  .topbar-user span:last-child {
    display: none;
  }

  html.theme-dark .app-shell {
    padding: 10px;
    gap: 10px;
  }

  html.theme-dark .app-sidebar {
    border-radius: 16px;
  }

  html.theme-dark .topbar {
    border-radius: 14px;
  }

  html.theme-dark .pipeline-switch {
    justify-content: flex-start;
  }

  html.theme-dark .week-mini-row::after {
    left: .65rem;
    right: .65rem;
  }
}

/* ==========================================================
   Visual refresh aligned with reference project
   ========================================================== */

:root {
  --modal-shell-bg: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(245, 249, 255, .97));
  --modal-shell-bg-body: linear-gradient(180deg, rgba(252, 254, 255, .98), rgba(246, 250, 255, .96));
  --modal-shell-border: rgba(182, 200, 229, .78);
  --modal-shell-shadow: 0 28px 64px rgba(22, 41, 73, .22);
  --modal-shell-header: linear-gradient(180deg, rgba(248, 251, 255, .98), rgba(239, 245, 255, .98));
  --modal-shell-text: #1f304c;
  --accent-warm: #c87a31;
  --accent-warm-strong: #a85f1d;
  --accent-warm-soft: rgba(200, 122, 49, .12);
}

html.theme-dark {
  --modal-shell-bg: linear-gradient(180deg, rgba(12, 22, 41, .98), rgba(8, 15, 28, .98));
  --modal-shell-bg-body: linear-gradient(180deg, rgba(10, 19, 36, .98), rgba(7, 14, 28, .97));
  --modal-shell-border: rgba(61, 89, 133, .82);
  --modal-shell-shadow: 0 30px 70px rgba(2, 10, 28, .7);
  --modal-shell-header: linear-gradient(180deg, rgba(16, 29, 53, .94), rgba(10, 21, 39, .92));
  --modal-shell-text: #e6efff;
  --accent-warm: #d58a43;
  --accent-warm-strong: #b56a22;
  --accent-warm-soft: rgba(213, 138, 67, .16);
}

body.modal-open .modal-backdrop.show {
  background:
    radial-gradient(circle at 20% 20%, rgba(104, 145, 218, .18), transparent 34%),
    radial-gradient(circle at 82% 16%, rgba(213, 138, 67, .14), transparent 36%),
    rgba(8, 14, 26, .56);
  opacity: 1;
  backdrop-filter: blur(10px) saturate(120%);
}

.modal.fade .modal-dialog {
  transform: translateY(16px) scale(.985);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}

.modal.show .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal .modal-content {
  border-radius: 28px;
  border: 1px solid var(--modal-shell-border);
  background: var(--modal-shell-bg);
  color: var(--modal-shell-text);
  box-shadow: var(--modal-shell-shadow);
  overflow: hidden;
}

.modal .modal-header,
.modal .modal-footer {
  background: var(--modal-shell-header);
  border-color: var(--modal-shell-border);
  padding: 1rem 1.25rem;
}

.modal .modal-body {
  background: var(--modal-shell-bg-body);
  padding: 1.2rem 1.25rem;
}

.modal .modal-title {
  font-weight: 800;
  letter-spacing: -.02em;
}

.modal .btn-close {
  opacity: .72;
}

.modal .btn-close:hover {
  opacity: 1;
}

html.theme-dark #userEditModal .btn-close {
  filter: invert(1) grayscale(1) brightness(220%);
}

.planning-unified-page .plan-header-actions .plan-quick-action-download {
  border-color: rgba(200, 122, 49, 0.24);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 246, 238, 0.96) 100%);
  color: #8d5218;
}

.planning-unified-page .plan-header-actions .plan-quick-action-download i {
  background: rgba(200, 122, 49, 0.12);
  color: #b76b22;
}

.planning-unified-page .plan-header-actions .plan-quick-action-download:hover,
.planning-unified-page .plan-header-actions .plan-quick-action-download:focus-visible {
  border-color: rgba(183, 107, 34, 0.34);
  background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(255, 239, 226, 0.98) 100%);
  color: #7b4514;
}

.dash-list-item.is-executed {
  border-left-color: var(--accent-warm);
}

.dash-stat-card.stat-approved {
  background: linear-gradient(142deg, #975b24 0%, #b7722d 54%, #d8964f 100%);
}

.dash-day-modal-item.is-executed {
  border-left-color: rgba(200, 122, 49, .78);
}

.dash-day-modal-pill {
  color: #8f541a;
  background: rgba(251, 233, 211, .94);
  border-color: rgba(200, 122, 49, .34);
}

.content-wrap .text-success,
.users-page .text-success {
  color: #b66a23 !important;
}

.btn-success {
  --bs-btn-bg: linear-gradient(135deg, #d08940, #b96d22);
  --bs-btn-border-color: #c27831;
  --bs-btn-hover-bg: linear-gradient(135deg, #da9550, #c4772b);
  --bs-btn-hover-border-color: #cf8740;
  --bs-btn-active-bg: linear-gradient(135deg, #be742c, #a85f1d);
  --bs-btn-active-border-color: #cf8740;
}

.btn-outline-success {
  --bs-btn-color: #a7601d;
  --bs-btn-border-color: rgba(183, 107, 34, .48);
  --bs-btn-hover-color: #fff7ef;
  --bs-btn-hover-bg: #b56a22;
  --bs-btn-hover-border-color: #c77d35;
}

.badge.text-bg-success {
  background: rgba(200, 122, 49, .16) !important;
  color: #9b5a19 !important;
  border: 1px solid rgba(200, 122, 49, .28);
}

html.theme-dark .dash-day-modal-item.is-executed {
  border-left-color: rgba(213, 138, 67, .78);
}

html.theme-dark .dash-stat-card.stat-approved {
  background: linear-gradient(142deg, #915723 0%, #ad6828 54%, #ce8541 100%);
}

html.theme-dark .dash-day-modal-pill,
html.theme-dark .movement-assignment {
  color: #ffd7ad;
  background: rgba(120, 72, 27, .28);
  border-color: rgba(213, 138, 67, .36);
}

html.theme-dark .content-wrap .text-success,
html.theme-dark .users-page .text-success {
  color: #ffc78c !important;
}

html.theme-dark .btn-success {
  --bs-btn-bg: linear-gradient(135deg, #d18b45, #b76b22);
  --bs-btn-border-color: #c57d37;
  --bs-btn-hover-bg: linear-gradient(135deg, #dda05c, #c97a30);
  --bs-btn-hover-border-color: #dda05c;
  box-shadow: 0 10px 22px rgba(88, 46, 11, .34);
}

html.theme-dark .btn-outline-success {
  --bs-btn-color: #ffd6ac;
  --bs-btn-border-color: rgba(184, 112, 40, .62);
  --bs-btn-hover-color: #fffaf4;
  --bs-btn-hover-bg: rgba(168, 98, 30, .86);
  --bs-btn-hover-border-color: rgba(213, 138, 67, .88);
}

html.theme-dark .badge.text-bg-success {
  background: rgba(165, 97, 31, .26) !important;
  color: #ffd7ad !important;
  border: 1px solid rgba(213, 138, 67, .38);
  box-shadow: 0 0 14px rgba(121, 67, 18, .24);
}

.light-mode-bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -10;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.5s ease;
}

body.page-planning .light-mode-bg-canvas {
  display: none;
}

html.theme-dark .light-mode-bg-canvas {
  opacity: 0;
}

/* ─── Background watermark image (light mode) ──────────────────────── */
.excavator-wm {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -9;
  background-image:
    linear-gradient(rgba(255,255,255,0.88), rgba(255,255,255,0.88)),
    url('/ShepardViaticos/public/assets/img/bg_light.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}
/* watermark only visible in dark mode — light mode uses radar background */
html:not(.theme-dark) .excavator-wm {
  display: none;
}
html.theme-dark .excavator-wm {
  display: none;
}


/* ==========================================================
   Dark Readability Pass - Planning Workspace
   ========================================================== */
html.theme-dark .planning-unified-page {
  --planning-paper: rgba(6, 13, 25, 0.9);
  --planning-paper-strong: rgba(8, 17, 32, 0.96);
  --planning-shell-border: rgba(78, 105, 146, 0.56);
  --planning-line: rgba(66, 90, 130, 0.46);
  --planning-title: #eaf2ff;
  --planning-muted: #a9bedc;
}

html.theme-dark .planning-unified-page .planning-entry-card,
html.theme-dark .planning-unified-page .planning-inline-exec-card,
html.theme-dark .planning-unified-page .planning-agenda-card,
html.theme-dark .planning-unified-page .planning-mini-dashboard {
  background:
    radial-gradient(circle at 100% -30%, rgba(84, 140, 229, 0.12) 0%, transparent 42%),
    linear-gradient(165deg, rgba(9, 18, 35, 0.9) 0%, rgba(6, 12, 24, 0.94) 62%, rgba(5, 10, 20, 0.96) 100%);
  border-color: rgba(86, 113, 154, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(167, 191, 230, 0.08),
    0 24px 42px rgba(2, 8, 23, 0.58);
}

html.theme-dark .planning-unified-page .planning-entry-card .card-header,
html.theme-dark .planning-unified-page .planning-inline-exec-card .card-header,
html.theme-dark .planning-unified-page .planning-agenda-card .card-header,
html.theme-dark .planning-unified-page .planning-mini-dashboard .card-header {
  background:
    linear-gradient(180deg, rgba(18, 33, 58, 0.94) 0%, rgba(11, 22, 41, 0.92) 100%);
  border-bottom-color: rgba(70, 98, 142, 0.74);
}

html.theme-dark .planning-unified-page #agenda-container > .table-responsive,
html.theme-dark .planning-unified-page #exec-activities-container > .table-responsive,
html.theme-dark .planning-unified-page .exec-day-detail .table-responsive {
  border-color: rgba(66, 92, 133, 0.76);
  background: linear-gradient(180deg, rgba(7, 15, 30, 0.96), rgba(5, 11, 23, 0.94));
  box-shadow: inset 0 1px 0 rgba(139, 168, 214, 0.08);
}

html.theme-dark .planning-unified-page #agenda-container .table thead th,
html.theme-dark .planning-unified-page #exec-activities-container .table thead th {
  color: #b8cdef;
  border-bottom-color: rgba(87, 120, 172, 0.72);
  background:
    linear-gradient(180deg, rgba(20, 36, 63, 0.96) 0%, rgba(13, 26, 47, 0.96) 100%);
}

html.theme-dark .planning-unified-page #agenda-container .table tbody tr:not(.agenda-exec-inline-row) td,
html.theme-dark .planning-unified-page #exec-activities-container .table tbody tr td {
  color: #deebff;
  background: rgba(8, 17, 33, 0.72);
  border-bottom-color: rgba(66, 92, 133, 0.52);
}

html.theme-dark .planning-unified-page #agenda-container .table tbody tr:not(.agenda-exec-inline-row):nth-child(even) td,
html.theme-dark .planning-unified-page #exec-activities-container .table tbody tr:nth-child(even) td {
  background: rgba(10, 21, 40, 0.74);
}

html.theme-dark .planning-unified-page #agenda-container .table tbody tr:hover td,
html.theme-dark .planning-unified-page #exec-activities-container .table tbody tr:hover td {
  background: rgba(22, 40, 72, 0.82);
}

html.theme-dark .planning-unified-page #agenda-container .agenda-detail-client,
html.theme-dark .planning-unified-page #agenda-container .agenda-compact-day-client {
  color: #f6faff;
}

html.theme-dark .planning-unified-page #agenda-container .agenda-detail-meta,
html.theme-dark .planning-unified-page #agenda-container .agenda-detail-note,
html.theme-dark .planning-unified-page #agenda-container .agenda-detail-time,
html.theme-dark .planning-unified-page #agenda-container .agenda-compact-day-meta,
html.theme-dark .planning-unified-page #agenda-container .agenda-compact-day-note,
html.theme-dark .planning-unified-page #agenda-container .agenda-compact-day-time,
html.theme-dark .planning-unified-page .text-muted {
  color: #a7bddb !important;
}

html.theme-dark .planning-unified-page .planning-form-stack .subgrid {
  background:
    linear-gradient(180deg, rgba(10, 21, 39, 0.94) 0%, rgba(7, 15, 28, 0.92) 100%);
  border-color: rgba(78, 104, 144, 0.56);
}

html.theme-dark .planning-unified-page .planning-accordion-toggle:hover,
html.theme-dark .planning-unified-page .planning-accordion-toggle:focus-visible {
  background: rgba(50, 96, 168, 0.16);
}

html.theme-dark .planning-unified-page .planning-admin-week-card,
html.theme-dark .planning-unified-page .dash-chart-card {
  border-color: rgba(80, 108, 150, 0.62);
  background: linear-gradient(170deg, rgba(9, 19, 38, 0.9), rgba(6, 13, 26, 0.94));
}

html.theme-dark .planning-unified-page .dash-charts-row .dash-chart-card .card-body {
  background:
    linear-gradient(180deg, rgba(10, 21, 41, 0.72), rgba(7, 14, 28, 0.76));
}

html.theme-dark .planning-unified-page .planning-history-mode-hint {
  color: #b3c8e7;
}

/* ==========================================================
   Dark Visual Refresh (inspired by provided reference)
   ========================================================== */
html.theme-dark .planning-unified-page {
  --planning-paper: rgba(6, 11, 22, 0.94);
  --planning-paper-strong: rgba(8, 15, 29, 0.98);
  --planning-shell-border: rgba(64, 88, 128, 0.72);
  --planning-line: rgba(46, 68, 106, 0.56);
  --planning-title: #edf3ff;
  --planning-muted: #9ab0d4;
}

html.theme-dark .planning-unified-page::before {
  background:
    radial-gradient(circle at 8% 6%, rgba(73, 150, 255, 0.14) 0%, transparent 34%),
    radial-gradient(circle at 82% -4%, rgba(114, 120, 255, 0.1) 0%, transparent 30%),
    linear-gradient(180deg, rgba(5, 10, 21, 0.82) 0%, rgba(4, 8, 17, 0.28) 100%);
}

html.theme-dark .planning-unified-page::after {
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(117, 145, 191, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(117, 145, 191, 0.16) 1px, transparent 1px);
}

html.theme-dark .planning-unified-page .cloud-card {
  border-color: rgba(69, 96, 142, 0.72);
  background:
    radial-gradient(circle at 100% -40%, rgba(76, 139, 234, 0.12) 0%, transparent 42%),
    linear-gradient(168deg, rgba(8, 15, 30, 0.96) 0%, rgba(6, 11, 22, 0.96) 100%);
  box-shadow:
    inset 0 1px 0 rgba(145, 175, 227, 0.08),
    0 24px 44px rgba(2, 7, 20, 0.62);
}

html.theme-dark .planning-unified-page .cloud-card::before {
  background: linear-gradient(90deg,
      rgba(255, 92, 120, 0),
      rgba(255, 92, 120, 0.42),
      rgba(106, 159, 255, 0.36),
      rgba(255, 92, 120, 0));
}

html.theme-dark .planning-unified-page .planning-entry-card .card-header,
html.theme-dark .planning-unified-page .planning-inline-exec-card .card-header,
html.theme-dark .planning-unified-page .planning-agenda-card .card-header,
html.theme-dark .planning-unified-page .planning-mini-dashboard .card-header {
  background:
    linear-gradient(180deg, rgba(16, 29, 52, 0.95) 0%, rgba(10, 20, 38, 0.93) 100%);
  border-bottom-color: rgba(64, 88, 128, 0.74);
}

html.theme-dark .planning-unified-page .planning-entry-card-body,
html.theme-dark .planning-unified-page .planning-inline-exec-body,
html.theme-dark .planning-unified-page .planning-agenda-body {
  background:
    linear-gradient(180deg, rgba(8, 15, 29, 0.86) 0%, rgba(6, 11, 22, 0.9) 100%);
}

html.theme-dark .planning-unified-page .planning-panel-kicker,
html.theme-dark .planning-unified-page .planning-history-kicker {
  color: #90a9d1;
}

html.theme-dark .planning-unified-page .planning-panel-heading h5,
html.theme-dark .planning-unified-page .planning-panel-heading h6,
html.theme-dark .planning-unified-page .planning-history-title h6,
html.theme-dark .planning-unified-page .planning-mini-dashboard-title h6 {
  color: #f2f7ff;
}

html.theme-dark .planning-unified-page .planning-panel-heading h5 i,
html.theme-dark .planning-unified-page .planning-panel-heading h6 i,
html.theme-dark .planning-unified-page .planning-history-title h6 i,
html.theme-dark .planning-unified-page .planning-mini-dashboard-title h6 i {
  color: #ff5c78;
}

html.theme-dark .planning-unified-page .form-control,
html.theme-dark .planning-unified-page .form-select {
  background:
    linear-gradient(180deg, rgba(7, 15, 30, 0.96) 0%, rgba(6, 12, 24, 0.94) 100%);
  border-color: rgba(69, 97, 145, 0.82);
  color: #e9f1ff;
}

html.theme-dark .planning-unified-page .form-control::placeholder {
  color: #7288ad;
}

html.theme-dark .planning-unified-page .form-control:focus,
html.theme-dark .planning-unified-page .form-select:focus {
  border-color: rgba(255, 92, 120, 0.74);
  box-shadow: 0 0 0 0.17rem rgba(255, 92, 120, 0.18);
}

html.theme-dark .planning-unified-page .plan-header-actions .plan-quick-action {
  border-color: rgba(73, 103, 154, 0.76);
  background:
    linear-gradient(180deg, rgba(9, 18, 35, 0.96) 0%, rgba(7, 14, 28, 0.92) 100%);
  color: #d9e7ff;
}

html.theme-dark .planning-unified-page .plan-header-actions .plan-quick-action:hover,
html.theme-dark .planning-unified-page .plan-header-actions .plan-quick-action:focus-visible {
  border-color: rgba(96, 132, 193, 0.86);
  background:
    linear-gradient(180deg, rgba(12, 23, 44, 0.98) 0%, rgba(8, 17, 32, 0.94) 100%);
  color: #f3f8ff;
}

html.theme-dark .planning-unified-page #agenda-container > .table-responsive,
html.theme-dark .planning-unified-page #exec-activities-container > .table-responsive,
html.theme-dark .planning-unified-page .exec-day-detail .table-responsive {
  border-color: rgba(64, 90, 133, 0.8);
  background:
    linear-gradient(180deg, rgba(7, 14, 27, 0.96) 0%, rgba(5, 10, 20, 0.96) 100%);
}

html.theme-dark .planning-unified-page #agenda-container .table thead th,
html.theme-dark .planning-unified-page #exec-activities-container .table thead th {
  color: #a9c2e8;
  border-bottom-color: rgba(74, 107, 161, 0.82);
  background:
    linear-gradient(180deg, rgba(16, 30, 53, 0.98) 0%, rgba(10, 21, 39, 0.96) 100%);
}

html.theme-dark .planning-unified-page #agenda-container .table tbody tr:not(.agenda-exec-inline-row) td,
html.theme-dark .planning-unified-page #exec-activities-container .table tbody tr td {
  color: #deebff;
  background: rgba(8, 16, 31, 0.78);
  border-bottom-color: rgba(56, 82, 124, 0.56);
}

html.theme-dark .planning-unified-page #agenda-container .table tbody tr:not(.agenda-exec-inline-row):nth-child(even) td,
html.theme-dark .planning-unified-page #exec-activities-container .table tbody tr:nth-child(even) td {
  background: rgba(9, 19, 37, 0.82);
}

html.theme-dark .planning-unified-page #agenda-container .table tbody tr:hover td,
html.theme-dark .planning-unified-page #exec-activities-container .table tbody tr:hover td {
  background: rgba(17, 33, 61, 0.86);
}

html.theme-dark .planning-unified-page #agenda-container .agenda-detail-client,
html.theme-dark .planning-unified-page #agenda-container .agenda-compact-day-client {
  color: #f7fbff;
}

html.theme-dark .planning-unified-page #agenda-container .agenda-detail-meta,
html.theme-dark .planning-unified-page #agenda-container .agenda-detail-note,
html.theme-dark .planning-unified-page #agenda-container .agenda-detail-time,
html.theme-dark .planning-unified-page #agenda-container .agenda-compact-day-meta,
html.theme-dark .planning-unified-page #agenda-container .agenda-compact-day-note,
html.theme-dark .planning-unified-page #agenda-container .agenda-compact-day-time {
  color: #9db4d9;
}

/* ==========================================================
   Topbar user dropdown (menú desplegable bajo el avatar)
   ========================================================== */

.topbar-user-dropdown {
  position: relative;
}

.topbar-user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  border: 1px solid rgba(140, 166, 210, .55);
  background: #fff;
  color: #223750;
  cursor: pointer;
  font: inherit;
  transition: box-shadow .15s ease, border-color .15s ease, transform .1s ease;
  box-shadow: 0 2px 6px rgba(44, 73, 120, .08);
}

.topbar-user-trigger:hover,
.topbar-user-trigger:focus-visible {
  border-color: #5a8fd6;
  box-shadow: 0 4px 12px rgba(44, 73, 120, .14);
  outline: none;
}

.topbar-user-trigger[aria-expanded="true"] {
  border-color: #3a7bd1;
  box-shadow: 0 0 0 3px rgba(58, 123, 209, .18);
}

.topbar-user-trigger .avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c5d6ee, #a7bfe1);
  color: #1a3158;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.topbar-user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  min-width: 0;
}

.topbar-user-name {
  font-weight: 700;
  font-size: 13px;
  color: #1a3158;
  white-space: nowrap;
}

.topbar-user-role {
  font-size: 10.5px;
  color: #5d7491;
  text-transform: lowercase;
  letter-spacing: .2px;
  margin-top: 1px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.topbar-user-role i {
  font-size: 9.5px;
  color: #3a7bd1;
}

.topbar-user-caret {
  margin-left: 2px;
  font-size: 10px;
  color: #6b85a6;
  transition: transform .2s ease;
}

.topbar-user-trigger[aria-expanded="true"] .topbar-user-caret {
  transform: rotate(180deg);
}

.topbar-user-menu {
  min-width: 248px;
  margin-top: 8px !important;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(140, 166, 210, .35);
  background: #fff;
  box-shadow: 0 12px 28px rgba(44, 73, 120, .18), 0 2px 6px rgba(44, 73, 120, .08);
}

.topbar-user-menu .dropdown-header {
  padding: 6px 12px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: #6b85a6;
  font-weight: 700;
}

.topbar-user-menu .dropdown-divider {
  border-top-color: rgba(140, 166, 210, .25);
  margin: 6px 4px;
}

.topbar-user-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  color: #2d4361;
  transition: background-color .12s ease, color .12s ease;
}

.topbar-user-menu .dropdown-item i {
  width: 18px;
  text-align: center;
  font-size: 13px;
  color: #5a7aa3;
}

.topbar-user-menu .dropdown-item:hover,
.topbar-user-menu .dropdown-item:focus {
  background-color: rgba(58, 123, 209, .1);
  color: #1a3158;
}

.topbar-user-menu .dropdown-item:hover i,
.topbar-user-menu .dropdown-item:focus i {
  color: #3a7bd1;
}

.topbar-user-menu .dropdown-item.active {
  background-color: rgba(58, 123, 209, .15);
  color: #1a3158;
  font-weight: 600;
}

.topbar-user-menu .topbar-user-menu-logout {
  color: #c0392b;
}

.topbar-user-menu .topbar-user-menu-logout i {
  color: #c0392b;
}

.topbar-user-menu .topbar-user-menu-logout:hover,
.topbar-user-menu .topbar-user-menu-logout:focus {
  background-color: rgba(192, 57, 43, .1);
  color: #a93226;
}

/* ----- Modo oscuro ----- */
html.theme-dark .topbar-user-trigger {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

html.theme-dark .topbar-user-trigger:hover,
html.theme-dark .topbar-user-trigger:focus-visible {
  border-color: #38bdf8;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .4);
}

html.theme-dark .topbar-user-trigger[aria-expanded="true"] {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, .25);
}

html.theme-dark .topbar-user-trigger .avatar {
  background: linear-gradient(135deg, #475569, #334155);
  color: #e2e8f0;
}

html.theme-dark .topbar-user-name {
  color: #f1f5f9;
}

html.theme-dark .topbar-user-role {
  color: #94a3b8;
}

html.theme-dark .topbar-user-role i {
  color: #38bdf8;
}

html.theme-dark .topbar-user-caret {
  color: #94a3b8;
}

html.theme-dark .topbar-user-menu {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .35);
}

html.theme-dark .topbar-user-menu .dropdown-header {
  color: #94a3b8;
}

html.theme-dark .topbar-user-menu .dropdown-divider {
  border-top-color: #334155;
}

html.theme-dark .topbar-user-menu .dropdown-item {
  color: #cbd5e1;
}

html.theme-dark .topbar-user-menu .dropdown-item i {
  color: #94a3b8;
}

html.theme-dark .topbar-user-menu .dropdown-item:hover,
html.theme-dark .topbar-user-menu .dropdown-item:focus {
  background-color: rgba(56, 189, 248, .15);
  color: #f1f5f9;
}

html.theme-dark .topbar-user-menu .dropdown-item:hover i,
html.theme-dark .topbar-user-menu .dropdown-item:focus i {
  color: #38bdf8;
}

html.theme-dark .topbar-user-menu .dropdown-item.active {
  background-color: rgba(56, 189, 248, .22);
  color: #f1f5f9;
}

html.theme-dark .topbar-user-menu .topbar-user-menu-logout {
  color: #f87171;
}

html.theme-dark .topbar-user-menu .topbar-user-menu-logout i {
  color: #f87171;
}

html.theme-dark .topbar-user-menu .topbar-user-menu-logout:hover,
html.theme-dark .topbar-user-menu .topbar-user-menu-logout:focus {
  background-color: rgba(248, 113, 113, .15);
  color: #fca5a5;
}

/* En pantallas chicas, escondemos texto del trigger pero dejamos el avatar y la flecha */
@media (max-width: 720px) {
  .topbar-user-trigger .topbar-user-info {
    display: none;
  }
  .topbar-user-trigger {
    padding: 4px 8px 4px 4px;
  }
}

/* ----- Fix de apilamiento del dropdown del usuario -----
   El .topbar usa backdrop-filter: blur, que crea un contexto de stacking
   y atrapa al dropdown debajo del contenido. Levantamos el z-index del
   topbar y del propio menú para que se vea por encima de todo. */
.topbar,
.topbar-nav-layout {
  position: relative;
  z-index: 1050;
}

.topbar-user-dropdown {
  position: relative;
  z-index: 1060;
}

.topbar-user-menu {
  z-index: 1080;
}

/* ===========================================================
 * Bitrix Deal Picker
 * Selector de oportunidad embebido en el form de actividades.
 * Funciona en tema claro y oscuro (usa tokens existentes y se
 * basa en colores del sistema Bootstrap para los badges).
 * =========================================================== */
.bx-deal-picker {
  display: block;
}
.bx-picker-display {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border: 1px dashed rgba(99, 102, 241, 0.45);
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.06);
  min-height: 60px;
}
.theme-dark .bx-picker-display {
  background: rgba(129, 140, 248, 0.10);
  border-color: rgba(129, 140, 248, 0.40);
}
.bx-picker-empty,
.bx-picker-selected,
.bx-picker-legacy {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}
.bx-picker-empty[hidden],
.bx-picker-selected[hidden],
.bx-picker-legacy[hidden] { display: none; }
.bx-picker-empty-icon {
  font-size: 22px;
  color: #6366f1;
  flex: 0 0 auto;
}
.bx-picker-empty-text {
  display: flex;
  flex-direction: column;
  flex: 1 1 240px;
  gap: 2px;
}
.bx-picker-empty-text strong { font-size: 14px; color: inherit; }
.bx-picker-empty-text small  { font-size: 12px; color: #6b7280; }
.theme-dark .bx-picker-empty-text small { color: #94a3b8; }
.bx-pick-cta { flex: 0 0 auto; }

.bx-picker-selected .bx-pick-info {
  flex: 1 1 240px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.bx-pick-line1 {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.bx-pick-stage {
  font-size: 11px !important;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  flex: 0 0 auto;
}
.bx-pick-title {
  font-weight: 700;
  font-size: 14px;
  color: inherit;
  word-break: break-word;
}
.bx-pick-line2 {
  font-size: 12px;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.theme-dark .bx-pick-line2 { color: #94a3b8; }
.bx-pick-dealid {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: #94a3b8;
}
.bx-pick-actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

.bx-picker-legacy .bx-legacy-info {
  flex: 1 1 240px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.bx-legacy-line { font-size: 13px; }
.bx-legacy-label {
  display: inline-block;
  width: 70px;
  color: #6b7280;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.theme-dark .bx-legacy-label { color: #94a3b8; }
.bx-legacy-note {
  font-size: 11px;
  color: #6b7280;
  margin-top: 4px;
  font-style: italic;
}

/* Modal del picker */
.bx-modal .modal-body { background: #f8fafc; }
.theme-dark .bx-modal .modal-content {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #334155;
}
.theme-dark .bx-modal .modal-body { background: #16213a; }
.theme-dark .bx-modal .modal-header,
.theme-dark .bx-modal .modal-footer { border-color: #334155; }
.theme-dark .bx-modal .form-control { background: #273449; color: #e2e8f0; border-color: #334155; }
.theme-dark .bx-modal .form-control::placeholder { color: #64748b; }
.theme-dark .bx-modal .input-group-text { background: #273449; color: #94a3b8; border-color: #334155; }
.theme-dark .bx-modal .text-muted { color: #94a3b8 !important; }
.theme-dark .bx-modal .btn-close { filter: invert(1) grayscale(100%); }
.theme-dark .bx-modal mark { background: rgba(56,189,248,0.30); color: #e0f2fe; padding: 0 2px; border-radius: 3px; }

.bx-modal mark { background: rgba(56,189,248,0.25); padding: 0 2px; border-radius: 3px; }
.bx-modal .bx-meta { font-size: 12px; }
.bx-modal .bx-spinner {
  display: inline-block; width: 11px; height: 11px;
  border: 2px solid #6366f1; border-top-color: transparent;
  border-radius: 50%; animation: bx-spin 0.7s linear infinite;
  vertical-align: -1px;
}
@keyframes bx-spin { to { transform: rotate(360deg); } }

.bx-results { display: flex; flex-direction: column; gap: 8px; }

.bx-result-item {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  border-left: 3px solid #6366f1;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
  position: relative;
}
.theme-dark .bx-result-item {
  background: #273449;
  border-color: #334155;
  border-left-color: #818cf8;
  color: #e2e8f0;
}
.bx-result-item:hover { background: #eef2ff; }
.theme-dark .bx-result-item:hover { background: #2f3e57; }
.bx-result-item.is-open { background: #eef2ff; border-left-color: #4f46e5; }
.theme-dark .bx-result-item.is-open { background: #2a3650; border-left-color: #c7d2fe; }
.bx-result-item .bx-chev {
  position: absolute;
  top: 12px; right: 12px;
  color: #94a3b8;
  font-size: 12px;
  transition: transform 150ms ease;
}
.bx-result-item.is-open .bx-chev { transform: rotate(90deg); color: #6366f1; }
.bx-contact-name { font-weight: 700; font-size: 14px; }
.bx-uid { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: #94a3b8; font-weight: 400; margin-left: 6px; }
.bx-company { color: #6366f1; font-size: 12px; margin-top: 2px; }
.theme-dark .bx-company { color: #c7d2fe; }
.bx-meta { color: #6b7280; font-size: 12px; margin-top: 2px; }
.theme-dark .bx-meta { color: #94a3b8; }
.muted-label { color: #94a3b8; }

/* Panel de deals dentro de cada contacto */
.bx-deals-panel { display: none; margin-top: 10px; padding-top: 10px; border-top: 1px dashed rgba(99,102,241,0.25); cursor: default; }
.theme-dark .bx-deals-panel { border-top-color: #334155; }
.bx-result-item.is-open .bx-deals-panel { display: block; }
.bx-deals-header {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px;
}
.bx-deals-summary { font-size: 13px; }
.bx-deals-count   { font-size: 11px; color: #94a3b8; }
.bx-deals-list { display: flex; flex-direction: column; gap: 6px; }
.bx-deal-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}
.theme-dark .bx-deal-item { background: #16213a; border-color: #334155; }
.bx-deal-item:hover { background: #eef2ff; border-color: #6366f1; }
.theme-dark .bx-deal-item:hover { background: #1a2746; border-color: #818cf8; }
.bx-deal-title { font-weight: 600; font-size: 13px; line-height: 1.3; }
.bx-deal-meta { color: #6b7280; font-size: 11px; margin-top: 4px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.theme-dark .bx-deal-meta { color: #94a3b8; }
.bx-deal-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.bx-deal-amount { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; font-weight: 600; }
.bx-deal-amount .ccy { color: #94a3b8; font-size: 10px; margin-left: 3px; font-weight: 400; }

.bx-empty { text-align: center; color: #94a3b8; padding: 12px; font-size: 13px; }
.bx-loading { color: #94a3b8; font-size: 12px; padding: 6px 2px; }
.bx-err { background: rgba(239,68,68,0.10); border-left: 3px solid #ef4444; padding: 10px 12px; border-radius: 6px; color: #b91c1c; font-family: monospace; font-size: 12px; white-space: pre-wrap; }
.theme-dark .bx-err { color: #fca5a5; }

.bx-create-form {
  margin-top: 10px;
  padding: 12px;
  background: rgba(56,189,248,0.06);
  border: 1px dashed #38bdf8;
  border-radius: 8px;
}
.theme-dark .bx-create-form { background: rgba(56,189,248,0.10); }
.bx-create-actions { display: flex; gap: 6px; justify-content: flex-end; margin-top: 8px; }

/* ===========================================================
 * Bitrix Typeahead (autocomplete inline para cliente/equipo)
 * =========================================================== */
.bx-ta-popover {
  position: absolute;
  z-index: 12000;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.18);
  max-height: 320px;
  overflow-y: auto;
  padding: 4px 0;
  font-size: 13px;
}
.bx-ta-popover--wide {
  max-height: min(78vh, 560px);
}
.theme-dark .bx-ta-popover {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
}
.bx-ta-suggestion {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 100ms ease;
}
.bx-ta-suggestion.is-active,
.bx-ta-suggestion:hover {
  background: #eef2ff;
}
.theme-dark .bx-ta-suggestion.is-active,
.theme-dark .bx-ta-suggestion:hover {
  background: #2a3650;
}
.bx-ta-icon {
  font-size: 16px;
  flex: 0 0 auto;
  margin-top: 1px;
}
.bx-ta-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1 1 auto;
}
.bx-ta-title {
  font-weight: 600;
  font-size: 13px;
  color: inherit;
  word-break: break-word;
}
.bx-ta-title mark {
  background: rgba(56, 189, 248, 0.30);
  color: inherit;
  padding: 0 2px;
  border-radius: 3px;
}
.bx-ta-sub {
  font-size: 11px;
  color: #6b7280;
}
.theme-dark .bx-ta-sub { color: #94a3b8; }
.bx-ta-stage {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.bx-ta-stage--open { background: rgba(56,189,248,0.18); color: #0284c7; }
.bx-ta-stage--won  { background: rgba(34,197,94,0.18);  color: #16a34a; }
.bx-ta-stage--lost { background: rgba(239,68,68,0.18);  color: #dc2626; }
.theme-dark .bx-ta-stage--open { color: #38bdf8; }
.theme-dark .bx-ta-stage--won  { color: #22c55e; }
.theme-dark .bx-ta-stage--lost { color: #ef4444; }
.bx-ta-empty,
.bx-ta-loading {
  padding: 10px 12px;
  color: #6b7280;
  font-size: 12px;
  font-style: italic;
}
.theme-dark .bx-ta-empty,
.theme-dark .bx-ta-loading { color: #94a3b8; }
.bx-ta-loading em { font-style: italic; }
.bx-ta-spinner {
  display: inline-block;
  width: 11px; height: 11px;
  border: 2px solid #6366f1;
  border-top-color: transparent;
  border-radius: 50%;
  animation: bx-spin 0.7s linear infinite;
  vertical-align: -1px;
  margin-right: 4px;
}
.bx-ta-deal-hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 10px 10px;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.08);
  color: #1d4ed8;
  font-size: 12px;
}
.theme-dark .bx-ta-deal-hint {
  background: rgba(96, 165, 250, 0.14);
  color: #bfdbfe;
}
.bx-ta-deal-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 8px 8px;
}
.bx-ta-deal-card {
  display: block;
  padding: 12px 13px;
  border: 1px solid rgba(99, 102, 241, 0.16);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245,249,255,0.98));
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}
.theme-dark .bx-ta-deal-card {
  background: linear-gradient(180deg, rgba(28, 39, 60, 0.98), rgba(20, 30, 47, 0.98));
  border-color: rgba(129, 140, 248, 0.18);
  box-shadow: 0 14px 28px rgba(2, 10, 28, 0.35);
}
.bx-ta-deal-card.is-active,
.bx-ta-deal-card:hover {
  background: linear-gradient(180deg, rgba(238, 242, 255, 0.98), rgba(224, 231, 255, 0.96));
  border-color: rgba(79, 70, 229, 0.32);
}
.theme-dark .bx-ta-deal-card.is-active,
.theme-dark .bx-ta-deal-card:hover {
  background: linear-gradient(180deg, rgba(39, 54, 84, 0.98), rgba(30, 43, 67, 0.96));
  border-color: rgba(165, 180, 252, 0.34);
}
.bx-ta-deal-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}
.bx-ta-deal-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.bx-ta-deal-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  text-align: right;
}
.bx-ta-deal-amount {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}
.theme-dark .bx-ta-deal-amount {
  color: #e2e8f0;
}
.bx-ta-deal-empty-state {
  margin: 8px 12px 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(14, 165, 233, 0.08);
  border: 1px dashed rgba(14, 165, 233, 0.36);
}
.theme-dark .bx-ta-deal-empty-state {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(125, 211, 252, 0.28);
}
.bx-ta-deal-empty-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}
.theme-dark .bx-ta-deal-empty-title {
  color: #e2e8f0;
}
.bx-ta-deal-empty-copy {
  margin-top: 4px;
  font-size: 12px;
  color: #475569;
}
.theme-dark .bx-ta-deal-empty-copy {
  color: #cbd5e1;
}
.bx-ta-deal-create-cta {
  margin: 2px 10px 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(99, 102, 241, 0.28);
  background: rgba(99, 102, 241, 0.05);
}
.theme-dark .bx-ta-deal-create-cta {
  border-color: rgba(129, 140, 248, 0.34);
  background: rgba(129, 140, 248, 0.10);
}
.bx-ta-deal-create-copy {
  margin-bottom: 8px;
  font-size: 11px;
  color: #475569;
}
.theme-dark .bx-ta-deal-create-copy {
  color: #cbd5e1;
}

/* CTA "+ Crear contacto" al final del listado o cuando no hay matches */
.bx-ta-create-cta {
  border-top: 1px dashed #e2e8f0;
  margin-top: 4px;
  padding: 6px 8px 4px;
}
.theme-dark .bx-ta-create-cta { border-top-color: #334155; }
.bx-ta-create-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 1px dashed #6366f1;
  background: rgba(99, 102, 241, 0.06);
  color: #4f46e5;
  border-radius: 8px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}
.bx-ta-create-btn:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: #4f46e5;
}
.theme-dark .bx-ta-create-btn { color: #c7d2fe; background: rgba(129, 140, 248, 0.10); border-color: #818cf8; }
.theme-dark .bx-ta-create-btn:hover { background: rgba(129, 140, 248, 0.20); }
.bx-ta-create-btn strong { color: inherit; }
.bx-ta-create-plus {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  background: #6366f1; color: #fff;
  border-radius: 50%;
  font-size: 14px; font-weight: 700;
  flex: 0 0 auto;
}

/* Mini-form de creación (reemplaza el contenido del popover al hacer click en CTA) */
.bx-ta-create-form {
  padding: 12px;
  background: rgba(99, 102, 241, 0.04);
  border-radius: 8px;
}
.bx-ta-deal-create-form {
  margin: 0 10px 10px;
  padding: 14px;
  border: 1px solid rgba(99, 102, 241, 0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
}
.theme-dark .bx-ta-create-form { background: rgba(129, 140, 248, 0.08); }
.theme-dark .bx-ta-deal-create-form {
  border-color: rgba(129, 140, 248, 0.24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.bx-ta-create-form-title {
  font-weight: 700;
  font-size: 13px;
  color: #4f46e5;
  margin-bottom: 8px;
}
.theme-dark .bx-ta-create-form-title { color: #c7d2fe; }
.bx-ta-create-form-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 8px;
}
.bx-ta-create-form-row.bx-ta-create-form-row-2col {
  flex-direction: row;
  gap: 8px;
}
.bx-ta-create-form-row.bx-ta-create-form-row-2col > div {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.bx-ta-create-form label {
  font-size: 10px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin: 0;
}
.theme-dark .bx-ta-create-form label { color: #94a3b8; }
.bx-ta-create-form label .req { color: #dc2626; }
.bx-ta-create-form input,
.bx-ta-create-form select {
  width: 100%;
  padding: 6px 9px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #0f172a;
  font-size: 12px;
  font-family: inherit;
}
.theme-dark .bx-ta-create-form input,
.theme-dark .bx-ta-create-form select { background: #273449; color: #e2e8f0; border-color: #334155; }
.bx-ta-create-form input[readonly] {
  background: #f8fafc;
  color: #334155;
}
.theme-dark .bx-ta-create-form input[readonly] {
  background: #223147;
  color: #e2e8f0;
}
.bx-ta-create-form select:disabled {
  opacity: 0.72;
  cursor: wait;
}
.bx-ta-create-form input:focus,
.bx-ta-create-form select:focus { outline: 2px solid #6366f1; outline-offset: 1px; border-color: #6366f1; }
.bx-ta-create-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 4px;
}
.bx-ta-btn-cancel,
.bx-ta-btn-submit {
  padding: 6px 11px;
  border-radius: 6px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: filter 120ms ease, background-color 120ms ease;
  border: 1px solid transparent;
}
.bx-ta-btn-cancel { background: transparent; color: #6b7280; border-color: #e2e8f0; }
.bx-ta-btn-cancel:hover { background: #f1f5f9; color: #0f172a; }
.theme-dark .bx-ta-btn-cancel { color: #94a3b8; border-color: #334155; }
.theme-dark .bx-ta-btn-cancel:hover { background: #2a3650; color: #e2e8f0; }
.bx-ta-btn-submit { background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%); color: #fff; font-weight: 600; }
.bx-ta-btn-submit--inline {
  width: 100%;
  justify-content: center;
}
.bx-ta-btn-submit:hover { filter: brightness(1.08); }
.bx-ta-btn-submit:disabled { opacity: 0.65; cursor: wait; }
.bx-ta-create-form-msg {
  margin-top: 6px;
  font-size: 11px;
  color: #6b7280;
}
.bx-ta-create-form-msg.is-err { color: #dc2626; }
.theme-dark .bx-ta-create-form-msg.is-err { color: #fca5a5; }

@media (max-width: 575.98px) {
  .bx-ta-create-form-row.bx-ta-create-form-row-2col {
    flex-direction: column;
  }
  .bx-ta-deal-top {
    grid-template-columns: 1fr;
  }
  .bx-ta-deal-side {
    align-items: flex-start;
    text-align: left;
  }
}

/* Estado "anclado": el input tiene un cliente u oportunidad confirmada */
input[data-bitrix-typeahead].bx-ta-anchored {
  border-color: #22c55e !important;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.18);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2316a34a'%3E%3Cpath d='M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.75.75 0 1 1 1.06-1.06L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 14px 14px;
  padding-right: 28px;
}
.theme-dark input[data-bitrix-typeahead].bx-ta-anchored {
  border-color: #22c55e !important;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.22);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%234ade80'%3E%3Cpath d='M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.75.75 0 1 1 1.06-1.06L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0z'/%3E%3C/svg%3E");
}

/* ══════════════════════════════════════════════════════════════════════════
   Aurora Preloader
══════════════════════════════════════════════════════════════════════════ */
#aurora-preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: #040911;
  overflow: hidden;
  transition: opacity 0.9s cubic-bezier(.4,0,.2,1), visibility 0.9s cubic-bezier(.4,0,.2,1);
}
#aurora-preloader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.aurora-pl-bg {
  position: absolute;
  inset: -60%;
  pointer-events: none;
}
.aurora-pl-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 55% at 20% 65%, rgba(47, 98, 255, 0.55) 0%, transparent 62%),
    radial-gradient(ellipse 65% 45% at 80% 35%, rgba(14, 165, 233, 0.45) 0%, transparent 58%),
    radial-gradient(ellipse 55% 65% at 50% 15%, rgba(99, 102, 241, 0.38) 0%, transparent 52%);
  animation: apl-drift-a 9s ease-in-out infinite alternate;
  filter: blur(48px);
}
.aurora-pl-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 75% 45% at 72% 72%, rgba(16, 185, 129, 0.32) 0%, transparent 58%),
    radial-gradient(ellipse 60% 55% at 28% 28%, rgba(139, 92, 246, 0.32) 0%, transparent 52%),
    radial-gradient(ellipse 70% 40% at 58% 55%, rgba(56, 189, 248, 0.25) 0%, transparent 55%);
  animation: apl-drift-b 12s ease-in-out infinite alternate;
  filter: blur(60px);
}
@keyframes apl-drift-a {
  0%   { transform: translate(0%, 0%) rotate(0deg) scale(1); }
  100% { transform: translate(9%, -7%) rotate(10deg) scale(1.12); }
}
@keyframes apl-drift-b {
  0%   { transform: translate(0%, 0%) rotate(0deg) scale(1.1); }
  100% { transform: translate(-9%, 7%) rotate(-10deg) scale(1); }
}

.aurora-pl-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 15% 20%, rgba(255,255,255,.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 35% 55%, rgba(255,255,255,.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 60% 15%, rgba(255,255,255,.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 78% 70%, rgba(255,255,255,.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 35%, rgba(255,255,255,.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 48% 80%, rgba(255,255,255,.3) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 8% 88%, rgba(255,255,255,.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 68% 42%, rgba(255,255,255,.5) 0%, transparent 100%);
  opacity: 0.7;
}

.aurora-pl-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  opacity: 0;
  animation: apl-content-in 1s 0.3s ease forwards;
}
@keyframes apl-content-in {
  0%   { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.aurora-pl-logo {
  height: 80px;
  width: auto;
  filter: drop-shadow(0 0 28px rgba(47, 98, 255, 0.75)) drop-shadow(0 0 8px rgba(14, 165, 233, 0.5));
}
.aurora-pl-label {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(180, 210, 255, 0.65);
}
.aurora-pl-dots {
  display: flex;
  gap: 7px;
  margin-top: 4px;
}
.aurora-pl-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.9);
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.6);
  animation: apl-dot 1.3s ease-in-out infinite;
}
.aurora-pl-dots span:nth-child(2) { animation-delay: 0.22s; }
.aurora-pl-dots span:nth-child(3) { animation-delay: 0.44s; }
@keyframes apl-dot {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.35; }
  40%            { transform: scale(1.3); opacity: 1; }
}

/* ══════════════════════════════════════════════════════════════════════════
   Falcon-style light mode overrides
   Para revertir: eliminar desde esta línea hasta el final del archivo.
══════════════════════════════════════════════════════════════════════════ */

/* Ocultar fondos decorativos animados (grid, dots, bloom) en modo claro */
html:not(.theme-dark) .app-shell-topnav::before,
html:not(.theme-dark) .app-shell-topnav::after,
html:not(.theme-dark) .app-main-topnav::before,
html:not(.theme-dark) .app-main-topnav::after {
  display: none;
}

/* Topbar plano estilo Falcon */
html:not(.theme-dark) .topbar {
  border-radius: 0;
  background: #ffffff;
  border: none;
  border-bottom: 1px solid #e3e6ef;
  box-shadow: 0 2px 8px rgba(65, 69, 88, .07);
  backdrop-filter: none;
}

/* Logo brand en topbar */
html:not(.theme-dark) .topbar-brand {
  border-radius: 10px;
  background: #f0f4fc;
  border: 1px solid #dbe3f3;
  box-shadow: none;
}

/* Topbar buttons y toggle */
html:not(.theme-dark) .topbar-theme-toggle {
  border-radius: 8px;
  border: 1px solid #dbe3f3;
  background: #f0f4fc;
  box-shadow: none;
}
html:not(.theme-dark) .topbar-theme-toggle:hover {
  background: #e4ecfa;
  box-shadow: none;
}
html:not(.theme-dark) .topbar-user {
  border-radius: 8px;
  border: 1px solid #dbe3f3;
  background: #f0f4fc;
  box-shadow: none;
}

/* Cards estilo Falcon */
html:not(.theme-dark) .cloud-card {
  border-radius: 8px;
  border: 1px solid #e3e6ef;
  box-shadow: 0 7px 14px rgba(65, 69, 88, .1), 0 3px 6px rgba(0, 0, 0, .05);
}

/* Card headers limpios (sin gradiente) */
html:not(.theme-dark) .cloud-card .card-header,
html:not(.theme-dark) .dashboard-home-page .cloud-card .card-header {
  background: #f9fbff;
  border-bottom: 1px solid #e3e6ef;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

/* Cards de planning */
html:not(.theme-dark) .planning-unified-page .planning-entry-card,
html:not(.theme-dark) .planning-unified-page .planning-inline-exec-card,
html:not(.theme-dark) .planning-unified-page .planning-agenda-card,
html:not(.theme-dark) .planning-unified-page .planning-mini-dashboard {
  border-radius: 8px;
  border: 1px solid #e3e6ef;
  box-shadow: 0 7px 14px rgba(65, 69, 88, .1), 0 3px 6px rgba(0, 0, 0, .05);
}
html:not(.theme-dark) .planning-unified-page .planning-entry-card .card-header,
html:not(.theme-dark) .planning-unified-page .planning-inline-exec-card .card-header,
html:not(.theme-dark) .planning-unified-page .planning-agenda-card .card-header,
html:not(.theme-dark) .planning-unified-page .planning-mini-dashboard .card-header {
  background: #f9fbff;
  border-bottom: 1px solid #e3e6ef;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

/* Área de contenido con más breathing room */
html:not(.theme-dark) .content-wrap {
  padding: 16px;
}
