/* ============================================================
   Azulae Shifts — mockup v6 · css/shifts.css
   Misma estructura que v5. Solo cambia el color y la forma.
   Cáscara Laravel/AdminLTE 2
   (wrapper, box, col-*, btn, form-control) sin cargar AdminLTE.
   Paleta del mockup 3: #e39d00 · #c19739 · #a47917 · #5EBEB5.
   Tema claro/oscuro html[data-theme].
   Jost un 6% más pequeña que Source Sans 3: ocupa el mismo ancho.
   ============================================================ */
@import url("https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap");

:root,
html[data-theme="light"] {
  /* Cyan en botones. Deep en texto de menú y enlaces. Teal en diseño y éxito. */
  --color-primary: #e39d00;
  --color-primary-hover: #a47917;
  --color-primary-active: #a47917;
  --color-primary-light: #c19739;
  --color-primary-soft: #f9f4e9;
  --color-accent: #e39d00;
  --color-accent-soft: color-mix(in srgb, #e39d00 14%, #fff);
  --color-ice: #e39d00;
  --color-teal: #5ebeb5;
  --color-text: #17304e;
  --color-text-muted: #4a5a6a;
  --color-text-faint: #5f7389;
  --color-background: #f4f7fb;
  --color-surface: #ffffff;
  --color-surface-sunken: #eef3f8;
  --color-border: #e3eaf2;
  --color-border-strong: #cfdbe8;
  --color-success: #5ebeb5;
  --color-success-strong: var(--shift-5);
  --color-success-soft: #e0f2ed;
  --color-warning: #a47917;
  --color-warning-strong: #a47917;
  --color-warning-soft: #f9f4e9;
  --color-danger: var(--shift-festive);
  --color-danger-strong: var(--shift-festive);
  --color-danger-soft: color-mix(in srgb, var(--shift-festive) 12%, #fff);
  --color-on-accent: #ffffff;
  --color-focus: #e39d00;

  /* Turnos del mockup 3. Texto de chip blanco. */
  --shift-1: #c19739;
  --shift-2: #17304e;
  --shift-3: #4a5a6a;
  --shift-4: #2a8f9a;
  --shift-5: #5ebeb5;
  --shift-7: #a47917;
  --shift-9: #b5810d;
  --shift-11: #e39d00;
  --shift-12: #c4a35a;
  --shift-festive: #d22858;
  --chip-contrast: #ffffff;
  --chip-contrast-festive: #ffffff;

  /* Forma y profundidad */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --shadow-sm: 0 2px 8px rgba(31, 41, 55, 0.05);
  --shadow-md: 0 8px 24px rgba(31, 41, 55, 0.08);
  --shadow-lg: 0 16px 40px rgba(31, 41, 55, 0.14);
  --card-border: 1px solid var(--color-border);
  --card-shadow: var(--shadow-sm);

  /* Tipo y ritmo */
  --font: "Jost", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --header-h: 68px;
  --sidebar-w: 248px;
}

html[data-theme="dark"] {
  --color-primary: #e39d00;
  --color-primary-hover: color-mix(in srgb, var(--color-primary) 82%, #fff);
  --color-primary-active: #e8c87f;
  --color-primary-light: #e8c87f;
  --color-primary-soft: #16283c;
  --color-accent: #e39d00;
  --color-accent-soft: color-mix(in srgb, #e39d00 22%, #121826);
  --color-ice: #e39d00;
  --color-teal: #5ebeb5;
  --color-text: #e8eef4;
  --color-text-muted: #a8b4c0;
  --color-text-faint: #8aa4b8;
  --color-background: #0b1220;
  --color-surface: #141c2b;
  --color-surface-sunken: #121826;
  --color-border: #243044;
  --color-border-strong: #33425c;
  --color-success: #5ebeb5;
  --color-success-strong: var(--shift-5);
  --color-success-soft: #173a35;
  --color-warning: #e8c87f;
  --color-warning-strong: #e8c87f;
  --color-warning-soft: #16283c;
  --color-danger: var(--shift-festive);
  --color-danger-strong: var(--shift-festive);
  --color-danger-soft: color-mix(in srgb, var(--shift-festive) 22%, #121826);
  --color-on-accent: #ffffff;
  --color-focus: var(--color-primary);

  --shift-1: #c19739;
  --shift-2: #8aa4b8;
  --shift-3: #a8b4c0;
  --shift-4: #2a8f9a;
  --shift-5: #5ebeb5;
  --shift-7: #a47917;
  --shift-9: #b5810d;
  --shift-11: #e39d00;
  --shift-12: #c4a35a;
  --shift-festive: #d22858;

  --card-border: 1px solid var(--color-border);
  --card-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.5);
}

html { color-scheme: light; height: 100%; }
html[data-theme="dark"] { color-scheme: dark; }

*,
*::before,
*::after { box-sizing: border-box; }

html,
body { margin: 0; min-height: 100%; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-background);
  -webkit-font-smoothing: antialiased;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--color-text-muted) 40%, transparent) transparent;
}
input,
textarea { caret-color: var(--color-primary); }

img { max-width: 100%; height: auto; }

a { color: #a47917; text-decoration: none; }
html[data-theme="dark"] a { color: #e39d00; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }

::selection {
  background: color-mix(in srgb, var(--color-accent) 26%, transparent);
  color: var(--color-text);
}

.tabular,
#durationStr,
.table,
.days-info,
.small-box h3,
.user-available-days {
  font-variant-numeric: tabular-nums;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -56px;
  z-index: 10000;
  background: var(--color-primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip-link:focus {
  top: 12px;
  color: #fff;
  text-decoration: none;
}

.pull-left { float: left; }
.pull-right { float: right; }
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--color-text-muted); }
.text-danger { color: var(--color-danger); }
.text-success { color: var(--color-success); }
.no-padding { padding: 0 !important; }
.no-margin { margin: 0; }

/* Utilidades de color de datos (paleta corporativa) */
.text-cyan { color: var(--color-accent); }
.text-blue { color: var(--color-primary-light); }
.text-teal { color: var(--color-success-strong); }
.text-deep { color: var(--color-primary); }

/* ------------------------------------------------------------
   Cáscara: header / sidebar / contenido / footer
   ------------------------------------------------------------ */
.wrapper {
  min-height: 100vh;
  position: relative;
}

.main-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  height: var(--header-h);
  display: flex;
  align-items: stretch;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.main-header .logo {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 8px 20px 8px 28px; /* alineado con avatar e iconos del menú (28px) */
  background: transparent;
  text-decoration: none;
}
.main-header .logo img {
  max-height: 34px;
  width: auto;
  max-width: 164px;
}
.logo-light { display: block; }
.logo-dark { display: none; }
html[data-theme="dark"] .logo-light { display: none; }
html[data-theme="dark"] .logo-dark { display: block; }

.navbar {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  min-width: 0;
}

.sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.sidebar-toggle::before {
  content: "";
  width: 18px;
  height: 12px;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 18px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 5px / 14px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 10px / 18px 2px no-repeat;
}
.sidebar-toggle:hover {
  background: var(--color-surface-sunken);
}

.navbar-custom-menu { margin-left: auto; }
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Interruptor de tema (switch discreto) */
.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.theme-switch .icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  opacity: 0.4;
}
.theme-switch[aria-checked="false"] .theme-switch-sun,
.theme-switch[aria-checked="true"] .theme-switch-moon {
  opacity: 1;
}
.theme-switch-track {
  width: 40px;
  height: 24px;
  border-radius: 999px;
  background: var(--color-border);
  position: relative;
  display: block;
  flex: 0 0 40px;
}
.theme-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  transform: translateX(0);
  transition: transform 160ms var(--ease);
}
.theme-switch[aria-checked="true"] .theme-switch-track {
  background: var(--color-primary);
}
.theme-switch[aria-checked="true"] .theme-switch-thumb {
  transform: translateX(16px);
}

/* Menú de usuario */
.user-menu > a,
.user-menu > button.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px 0 4px;
  color: var(--color-text);
  text-decoration: none;
  border: 0;
  background: transparent;
  border-radius: var(--radius-sm);
  font: 500 13px/1.2 var(--font);
  cursor: pointer;
}
.user-menu > a:hover,
.user-menu > button.dropdown-toggle:hover {
  background: var(--color-surface-sunken);
  text-decoration: none;
}
.user-initials,
.user-image {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--shift-5);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 240px;
  background: var(--color-surface);
  color: var(--color-text);
  border: var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 8px;
  list-style: none;
  margin: 0;
  z-index: 1040;
}
.user-menu.open .dropdown-menu { display: block; }
.user-header {
  padding: 12px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 8px;
}
.user-header p { margin: 0; font-weight: 600; font-size: 14px; }
.user-footer {
  display: block;
  padding: 8px;
}
.user-options {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.user-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.2;
  text-decoration: none;
}
.user-option:hover,
.user-option:focus {
  background: var(--color-surface-sunken);
  color: var(--color-text);
  text-decoration: none;
}
.user-option .icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: var(--color-primary);
}

/* Sidebar */
.main-sidebar {
  position: fixed;
  top: var(--header-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--color-surface);
  color: var(--color-text);
  overflow-y: auto;
  z-index: 1020;
  padding: 16px 16px 32px;
  border-right: 1px solid var(--color-border);
  transition: transform 180ms var(--ease);
}

.user-panel {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 12px 20px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}
.user-panel .image,
.user-panel .profile-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--shift-5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  flex: 0 0 40px;
}
.user-panel .info {
  min-width: 0;
}
.user-panel .info p {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--color-text-muted);
}
.user-status .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  flex: 0 0 8px;
}

.sidebar-menu {
  list-style: none;
  margin: 0;
  padding: 10px 0 0;
}
.sidebar-menu .header {
  padding: 16px 12px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}
.sidebar-menu li { margin-bottom: 4px; }
.sidebar-menu li a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 12px;
  color: var(--color-text-muted);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 400;
  font-size: 14px;
  transition: background 140ms var(--ease), color 140ms var(--ease);
}
.sidebar-menu li a:hover {
  background: var(--color-surface-sunken);
  color: var(--color-text);
  text-decoration: none;
}
.sidebar-menu li.active a {
  background: var(--color-primary-soft);
  color: #a47917;
  font-weight: 600;
}
html[data-theme="dark"] .sidebar-menu li.active a {
  background: color-mix(in srgb, var(--color-primary) 22%, transparent);
  color: #e8c87f;
}
.sidebar-menu li.active a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  bottom: 11px;
  width: 3px;
  border-radius: 999px;
  background: var(--color-primary);
}
.sidebar-menu .nav-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  stroke: currentColor;
}

.sidebar-menu .pull-right-container {
  margin-left: auto;
  display: flex;
  align-items: center;
}
.sidebar-menu .nav-caret {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  transition: transform 160ms ease;
}
.sidebar-menu .treeview.menu-open > a .nav-caret {
  transform: rotate(90deg);
}
.sidebar-menu .treeview-menu {
  list-style: none;
  margin: 0;
  padding: 2px 0 6px 16px;
}
.sidebar-menu .treeview-menu li a {
  min-height: 40px;
}

.sidebar-backdrop { display: none; }

/* Contenido */
.content-wrapper {
  margin-left: var(--sidebar-w);
  min-height: calc(100vh - var(--header-h) - 52px);
  padding: 28px 36px 56px;
  background: var(--color-background);
  scroll-margin-top: calc(var(--header-h) + 8px);
}

.content-header { padding: 4px 0 24px; }
.content-header .breadcrumb {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0 0 6px;
  padding: 0;
  font-size: 12px;
  color: var(--color-text-muted);
}
.content-header .breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--color-text-faint);
}
.content-header h1 {
  margin: 0;
  font-size: 22.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--color-text);
  text-wrap: pretty;
}
.content-header .content-description {
  margin: 6px 0 0;
  max-width: 100%;
  font-size: 14px;
  color: var(--color-text-muted);
}

.content {
  padding: 0;
}

.main-footer {
  margin-left: var(--sidebar-w);
  padding: 16px 24px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 13px;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}
.main-footer a { font-weight: 600; }

/* ------------------------------------------------------------
   Grid col-* (significado AdminLTE, mobile-first)
   ------------------------------------------------------------ */
.row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  align-content: flex-start;
  margin: 0 -12px;
}
.row > [class*="col-"] {
  padding: 0 12px;
  flex: 0 0 100%;
  max-width: 100%;
}

@media (min-width: 768px) {
  .row > .col-sm-2 { flex-basis: 16.666%; max-width: 16.666%; }
  .row > .col-sm-3 { flex-basis: 25%; max-width: 25%; }
  .row > .col-sm-4 { flex-basis: 33.333%; max-width: 33.333%; }
  .row > .col-sm-5 { flex-basis: 41.666%; max-width: 41.666%; }
  .row > .col-sm-6 { flex-basis: 50%; max-width: 50%; }
  .row > .col-sm-7 { flex-basis: 58.333%; max-width: 58.333%; }
  .row > .col-sm-8 { flex-basis: 66.666%; max-width: 66.666%; }
  .row > .col-sm-9 { flex-basis: 75%; max-width: 75%; }
  .row > .col-sm-12 { flex-basis: 100%; max-width: 100%; }
}
@media (min-width: 992px) {
  .row > .col-md-4 { flex-basis: 33.333%; max-width: 33.333%; }
  .row > .col-md-6 { flex-basis: 50%; max-width: 50%; }
  .row > .col-md-8 { flex-basis: 66.666%; max-width: 66.666%; }
  .row > .col-md-12 { flex-basis: 100%; max-width: 100%; }
}
@media (min-width: 1200px) {
  .row > .col-lg-3 { flex-basis: 25%; max-width: 25%; }
  .row > .col-lg-4 { flex-basis: 33.333%; max-width: 33.333%; }
  .row > .col-lg-6 { flex-basis: 50%; max-width: 50%; }
  .row > .col-lg-8 { flex-basis: 66.666%; max-width: 66.666%; }
  .row > .col-lg-9 { flex-basis: 75%; max-width: 75%; }
}

/* ------------------------------------------------------------
   Cajas (box) — superficie, 1px, sombra mínima
   ------------------------------------------------------------ */
.box,
.box-info,
.box-primary,
.box-success,
.box-solid,
.box-holiday-requests,
.box-holidays,
.box-festives,
.box-planning-requests {
  background: var(--color-surface);
  border: var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  margin-bottom: 24px;
}
.box-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 22px 24px 0;
}
.box-header.with-border,
.box-header.with-no-border {
  padding-bottom: 14px;
}
.box-header.with-border {
  margin-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}
.box-header.with-border + .box-body { padding-top: 4px; }
.box-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-text);
  text-wrap: pretty;
}

/* Un titulo de tarjeta que lleva un icono SVG necesita ser flex para
   que el icono quede centrado con el texto, igual que ya ocurre en
   las pieles Ciberpunk y 8-bits. Se limita a los titulos que
   contienen un icono para no alterar los que solo llevan texto. */
.box-title:has(> .icon) {
  display: flex;
  align-items: center;
  gap: 10px;
}

.box-body { padding: 20px 24px 24px; }
.box-footer {
  padding: 14px 24px 18px;
  border-top: 1px solid var(--color-border);
}
.box-tools { margin-left: auto; }

/* ------------------------------------------------------------
   KPIs (small-box): valor principal + variación + periodo
   ------------------------------------------------------------ */
.small-box {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: 28px 24px 16px;
  margin-bottom: 24px;
  min-height: 168px;
}
.small-box .inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  flex: 1;
}
.kpi-label {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 12.5px;
  font-weight: 500;
}
.small-box .inner h3 {
  margin: 2px 0 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text);
  line-height: 1.15;
}
.kpi-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--color-text-muted);
}
.small-box .icon { display: none; }
.small-box-footer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  margin: 24px -24px 0;
  padding: 16px 24px 0;
  color: var(--color-primary-light);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  background: none;
  border-top: 1px solid var(--color-border);
  width: calc(100% + 48px);
}
.small-box-footer .icon {
  display: block;
  width: 14px;
  height: 14px;
  transition: transform 140ms var(--ease);
}
.small-box-footer:hover { text-decoration: underline; }
.small-box-footer:hover .icon { transform: translateX(2px); }
.small-box.bg-aqua,
.small-box.bg-green,
.minimum-height { background: var(--color-surface); }

/* ------------------------------------------------------------
   Stats / resúmenes numéricos
   ------------------------------------------------------------ */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.stat-row > div { min-width: 0; }
.stat-val {
  display: block;
  font-size: 19.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.stat-lbl {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
}
.stat-row-div {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--color-border);
}

/* Festivos / listas con date-square */
.festive-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.festive-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--color-border);
}
.festive-list li:last-child { border-bottom: 0; }
.event-date {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  line-height: 1.05;
  border: 0;
}
.event-date span {
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.event-date small {
  font-size: 11px;
  font-weight: 500;
  text-transform: lowercase;
}
.event-cyan { background: #e39d00; color: #fff; }
.event-teal { background: #5ebeb5; color: #fff; }
.event-blue { background: #c19739; color: #fff; }
.event-deep { background: #a47917; color: #fff; }
.event-body { min-width: 0; flex: 1; }
.event-body p {
  margin: 0;
  font-weight: 500;
  color: var(--color-text);
}
.event-meta {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--color-text-muted);
}

/* Presencia del equipo */
.presence-panel { margin-bottom: 24px; }
.presence-group + .presence-group {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
}
.presence-group h4 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}
.presence-count {
  min-width: 22px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--color-surface-sunken);
  border: 0;
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.presence-group .empty-state {
  display: block;
  padding: 2px 0 8px;
  text-align: left;
}

/* ------------------------------------------------------------
   Botones — jerarquía primario / secundario / texto
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 20px;
  border-radius: 999px;
  border: 0;
  background: var(--color-primary-soft);
  color: #c19739;
  font: 600 14px/1.2 var(--font);
  cursor: pointer;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 150ms var(--ease), border-color 150ms var(--ease), color 150ms var(--ease), box-shadow 150ms var(--ease);
}
.btn:hover {
  background: color-mix(in srgb, #c19739 16%, var(--color-surface));
  color: #c19739;
  text-decoration: none;
}
.btn:active {
  background: color-mix(in srgb, #c19739 24%, var(--color-surface));
  color: #c19739;
}

/* Primario */
.btn-primary,
.btn-success {
  background: #c19739;
  border-color: #c19739;
  color: var(--color-on-accent);
}
.btn-primary:hover,
.btn-primary:focus,
.btn-success:hover,
.btn-success:focus {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: var(--color-on-accent);
}
.btn-primary:active,
.btn-success:active {
  background: var(--color-primary-active);
  border-color: var(--color-primary-active);
}

/* Secundario: mismo gris y azul que el clip y «Ver todos» */
.btn-default,
.btn-flat,
.btn-light,
.btn-default:hover,
.btn-flat:hover,
.btn-light:hover,
.btn-default:focus,
.btn-flat:focus,
.btn-light:focus {
  background: var(--color-primary-soft);
  color: #c19739;
}
button[name="btnPreviousMonth"],
button[name="btnNextMonth"],
button[name="btnPreviousMonth"]:hover,
button[name="btnNextMonth"]:hover,
button[name="btnPreviousMonth"]:focus,
button[name="btnNextMonth"]:focus {
  background: var(--color-primary-soft);
  color: #c19739;
}
html[data-theme="dark"] .btn:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-link):not(.btn-icon):not(.btn-icon-danger):not(.diary-remove),
html[data-theme="dark"] .btn:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-link):not(.btn-icon):not(.btn-icon-danger):not(.diary-remove):hover,
html[data-theme="dark"] .btn:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-link):not(.btn-icon):not(.btn-icon-danger):not(.diary-remove):focus,
html[data-theme="dark"] button[name="btnPreviousMonth"],
html[data-theme="dark"] button[name="btnNextMonth"] {
  color: #e8c87f;
}

/* Terciario (texto) */
.btn-link {
  background: none;
  border: 0;
  color: var(--color-primary);
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 999px;
  font-weight: 600;
}
.btn-link:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  text-decoration: none;
}
html[data-theme="dark"] .btn-link:hover {
  background: color-mix(in srgb, var(--color-primary) 22%, transparent);
}

.btn-danger {
  background: var(--color-danger);
  border-color: var(--color-danger);
  color: #fff;
}
.btn-danger:hover,
.btn-danger:focus {
  background: var(--color-danger-strong);
  border-color: var(--color-danger-strong);
  color: #fff;
}

.btn-sm {
  min-height: 34px;
  padding: 5px 14px;
  font-size: 12.5px;
}
.btn-primary-light {
  background: var(--color-primary-soft);
  border-color: transparent;
  color: #c19739;
}
.btn-primary-light:hover,
.btn-primary-light:focus {
  background: color-mix(in srgb, #c19739 16%, var(--color-surface));
  color: #c19739;
}
html[data-theme="dark"] .btn-primary-light,
html[data-theme="dark"] .btn-primary-light:hover,
html[data-theme="dark"] .btn-primary-light:focus { color: #e8c87f; }
.btn:disabled,
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-on-table,
.btn-group .btn-link,
.table .btn-link { min-width: 44px; }
.btn.large { min-width: 168px; }
.request-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.request-actions .btn-default,
.request-actions .btn-default:hover {
  width: 44px;
  min-width: 44px;
  padding: 0;
  gap: 0;
  font-size: 0;
  background: #f9f4e9;
  color: #c19739;
}
#nhr_addDocumentsContainer:not(:empty) { margin-top: 12px; }

/* ------------------------------------------------------------
   Formularios
   ------------------------------------------------------------ */
.form-control,
select.form-control,
textarea.form-control,
input.form-control {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--color-border-strong);
  border-radius: 10px;
  background-color: var(--color-surface);
  color: var(--color-text);
  font: 400 15px/1.4 var(--font);
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}
.form-control:hover { border-color: color-mix(in srgb, var(--color-primary) 45%, var(--color-border-strong)); }
.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 18%, transparent);
}
.form-control::placeholder { color: var(--color-text-faint); }
textarea.form-control { min-height: 76px; resize: vertical; }
.form-group { margin-bottom: 16px; }
label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 12.5px;
  color: var(--color-text-muted);
}
.input-group {
  display: flex;
  align-items: stretch;
}
.input-group .form-control { border-radius: 0 10px 10px 0; }
.input-group-addon {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: var(--color-surface-sunken);
  border: 1px solid var(--color-border-strong);
  border-right: 0;
  border-radius: 10px 0 0 10px;
  color: var(--color-text-muted);
}
.input-group-addon .icon { width: 18px; height: 18px; }
.input-group-btn { display: flex; gap: 8px; }
.input-group-btn .btn {
  width: 44px;
  flex: 0 0 44px;
  padding: 8px 0;
}
.box-footer .input-group {
  gap: 8px;
  align-items: center;
}
.box-footer .input-group .form-control { border-radius: 10px; }

/* ------------------------------------------------------------
   Progreso
   ------------------------------------------------------------ */
.progress {
  height: 6px;
  background: var(--color-border);
  border-radius: 999px;
  overflow: hidden;
  margin: 16px 0;
}
.progress-bar,
.progress-bar-green {
  height: 100%;
  background: var(--color-primary);
  border-radius: 999px;
  color: transparent;
  font-size: 0;
}

/* ------------------------------------------------------------
   Tablas
   ------------------------------------------------------------ */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
/* Tablas laterales sin contenedor propio (p. ej. solicitudes de cambio) */
.box-planning-requests .box-body { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th,
.table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}
.table thead th {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: -0.005em;
  background: var(--color-surface-sunken);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}
.table-striped tbody tr:nth-child(even) { background: transparent; }
.table-hover tbody tr:hover { background: var(--color-surface-sunken); }
.table-bordered th,
.table-bordered td {
  border: 0;
  border-bottom: 1px solid var(--color-border);
}
.table tbody tr:last-child td { border-bottom: 0; }

.box-planning-requests form { margin: 0; }
.table-planning-requests {
  margin-top: 16px;
  border-collapse: separate;
  border-spacing: 0;
}
.table-planning-requests thead th {
  background: var(--color-surface-sunken);
  border: 0;
  vertical-align: middle;
}
.table-planning-requests thead th:first-child { border-radius: 12px 0 0 12px; }
.table-planning-requests thead th:last-child { border-radius: 0 12px 12px 0; }
.table-planning-requests th:last-child,
.table-planning-requests td:last-child {
  text-align: right;
  vertical-align: middle;
}

/* Listas laterales de Laravel: la fila sangra hasta el borde de la card */
.box-holiday-requests .table-holiday-requests,
.box-holidays .table-holiday {
  display: block;
  width: auto;
  margin: 0 -24px;
}
.table-holiday-requests tbody,
.table-holiday tbody {
  display: flex;
  flex-direction: column;
}
.table-holiday-requests tr,
.table-holiday tr {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--color-border);
}
.table-holiday-requests tr:last-child,
.table-holiday tr:last-child { border-bottom: 0; }
.table-hover.table-holiday-requests tbody tr:hover,
.table-hover.table-holiday tbody tr:hover {
  background: var(--color-surface-sunken);
}
.table-holiday-requests td,
.table-holiday td {
  border: 0;
  padding: 0;
  background: transparent;
}
.table-holiday-requests td:first-child,
.table-holiday td:first-child {
  flex: 1;
  min-width: 0;
  line-height: 1.45;
}
.table-holiday-requests td:last-child { flex: 0 0 auto; }
/* La celda de acciones heredaba width:1% y padding:10px de las reglas
   genericas .profile-side/.profile-page .table-sidebar y se quedaba en 20px
   con botones de 44px dentro: los enlaces se salian de la tarjeta. */
.table-holiday-requests td:last-child,
.table-holiday td:last-child {
  width: auto;
  min-width: max-content;
  margin-left: auto;
  padding: 0;
  white-space: nowrap;
  text-align: right;
}
.table-holiday-requests td:last-child .btn-link,
.table-holiday td:last-child .btn-link { margin-left: 12px; }

.table-holiday-requests td[class*="holiday-request-status"] br,
.table-holiday td.holiday br:first-of-type { display: none; }
.table-holiday-requests td[class*="holiday-request-status"] b:has(+ .status-pill),
.table-holiday td.holiday b:nth-of-type(3) { margin-left: 12px; font-weight: 400; }
.table-holiday-requests .status-pill {
  display: flex;
  width: fit-content;
  margin: 10px 0 0;
}
.table-holiday-requests small,
.table-holiday small { color: var(--color-text-muted); padding-top: 10px; display: flex;}
.table-holiday-requests .btn-link {
  min-height: 0;
  padding: 4px 0;
  color: #c19739;
}
html[data-theme="dark"] .table-holiday-requests .btn-link { color: #e8c87f; }

/* Tabla de fichajes: cifras a la derecha, primera columna fija */
.table-diaries th:nth-child(n + 3):nth-child(-n + 10),
.table-diaries td:nth-child(n + 3):nth-child(-n + 10) {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.table-diaries th:nth-child(11),
.table-diaries td:nth-child(11) { text-align: center; }
.table-diaries th:nth-child(12),
.table-diaries td:nth-child(12) { text-align: right; }
.table-diaries thead th:first-child,
.table-diaries tbody td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
}
.table-diaries thead th:first-child { background: var(--color-surface-sunken); }
.table-diaries tbody td:first-child { background: var(--color-surface); }
.table tr.today td { background: var(--color-primary-soft); }
.table tr.today td:first-child {
  background: var(--color-primary-soft);
  box-shadow: inset 3px 0 0 var(--color-primary);
}
.table tr.danger td,
.table tr.pending td { background: var(--color-warning-soft); }
.table tr.danger td:first-child,
.table tr.pending td:first-child { background: var(--color-warning-soft); }
.table-diaries tfoot td {
  font-weight: 700;
  color: var(--color-text);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 0;
}
.table-diaries tfoot td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--color-surface);
}
.table-diaries .diff-neg { color: var(--color-danger); font-weight: 600; }
.table-diaries td:nth-child(11),
.table-diaries td:nth-child(12) { vertical-align: middle; }
.table-diaries .row-actions {
  display: inline-flex;
  justify-content: flex-end;
  gap: 2px;
}
.table-diaries .btn-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--color-primary);
}
.table-diaries .btn-icon .icon { width: 18px; height: 18px; }
.table-diaries .btn-icon:hover,
.table-diaries .btn-icon:focus { background: var(--color-primary-soft); }
.table-diaries .btn-icon-danger { color: var(--color-danger); }
.table-diaries .btn-icon-danger:hover,
.table-diaries .btn-icon-danger:focus { background: var(--color-danger-soft); }

.table .profile-photo {
  width: 40px;
  height: 40px;
  max-width: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.profile-photo-big { width: 72px; height: 72px; max-width: 72px; border-radius: 50%; object-fit: cover; display: block; }
.table .status-ok { color: var(--color-success); }
.table .status-no { color: var(--color-danger); }
.table .status-ok,
.table .status-no { width: 18px; height: 18px; }
.table a:has(> .icon),
.table button:has(> .icon),
.btn-group a:has(> .icon),
.btn-group button:has(> .icon) {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  color: var(--color-primary);
  vertical-align: middle;
}
.table a:has(> .icon) .icon,
.table button:has(> .icon) .icon,
.btn-group a:has(> .icon) .icon { width: 18px; height: 18px; }
.btn-group button:has(> .icon) .icon { width: 18px; height: 18px; }
.table a:has(> .icon):hover,
.table button:has(> .icon):hover,
.btn-group a:has(> .icon):hover,
.btn-group button:has(> .icon):hover {
  background: var(--color-primary-soft);
  text-decoration: none;
}
.table a:has(> .icon-danger),
.table button:has(> .icon-danger),
.btn-group a:has(> .icon-danger),
.btn-group button:has(> .icon-danger) { color: var(--color-danger); }
.table a:has(> .icon-danger):hover,
.table button:has(> .icon-danger):hover,
.btn-group a:has(> .icon-danger):hover,
.btn-group button:has(> .icon-danger):hover { background: var(--color-danger-soft); }
.btn-group { display: inline-flex; align-items: center; gap: 2px; }
.table .external-event.is-rest {
  background: var(--color-surface-sunken);
  color: var(--color-text);
  border: 0;
  box-shadow: none;
}

/* ------------------------------------------------------------
   Badges de estado (nunca solo color: punto + texto)
   ------------------------------------------------------------ */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid currentColor;
  background: none;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}
.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status-pill.ok { color: var(--color-success); }
.status-pill.pending,
.status-pill.warn { color: var(--color-warning-strong); }
.status-pill.rejected { color: var(--color-danger-strong); }
.status-pill.info { color: #a47917; }
html[data-theme="dark"] .status-pill.info { color: #e8c87f; }

/* ------------------------------------------------------------
   Tabs — control segmentado sobrio
   ------------------------------------------------------------ */
.nav-tabs {
  display: inline-flex;
  gap: 4px;
  list-style: none;
  margin: 16px 24px 20px;
  padding: 4px;
  background: var(--color-primary-soft);
  border-radius: 999px;
}
.nav-tabs li { margin: 0; }
.nav-tabs li a {
  display: block;
  min-height: 34px;
  padding: 6px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #c19739;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  transition: background 140ms var(--ease), color 140ms var(--ease);
}
.nav-tabs li a:hover {
  color: #c19739;
  text-decoration: none;
}
.nav-tabs li.active a,
.nav-tabs li a[aria-selected="true"] {
  background: #c19739;
  color: #fff;
}
html[data-theme="dark"] .nav-tabs li a { color: #e8c87f; }
html[data-theme="dark"] .nav-tabs li a:hover { color: #e8c87f; }
html[data-theme="dark"] .nav-tabs li.active a,
html[data-theme="dark"] .nav-tabs li a[aria-selected="true"] {
  background: #c19739;
  color: #fff;
}
.tab-content .tab-pane { display: none; }
.tab-content .tab-pane.active { display: block; }

/* Chat / tablón */
.chat .item {
  display: flex;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--color-border);
}
.chat .item:last-child { border-bottom: 0; }
.chat .message {
  margin: 0;
  min-width: 0;
  flex: 1;
}
.chat .name {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 3px;
  text-decoration: none;
}
.chat .name:hover { text-decoration: underline; }
.chat .name small {
  float: none;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--color-text-faint);
  font-variant-numeric: tabular-nums;
}
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 36px 16px;
  color: var(--color-text-muted);
  text-align: center;
  font-size: 13px;
}
.empty-state .icon {
  width: 28px;
  height: 28px;
  opacity: 0.4;
}

/* Avatares: iniciales blancas sobre el color del turno de cada persona */
.users-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.users-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.users-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  text-decoration: none;
  min-height: 44px;
  font-size: 13px;
  font-weight: 500;
  width: 100%;
  border-radius: var(--radius-sm);
  padding: 0 6px;
}
.users-list a:hover { background: var(--color-surface-sunken); }
.users-list .user-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.users-list .profile-photo,
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  flex: 0 0 32px;
}
.avatar.color-radio-1 { background: var(--shift-1); }
.avatar.color-radio-2 { background: var(--shift-2); }
.avatar.color-radio-5 { background: var(--shift-5); }
.avatar.color-radio-7 { background: var(--shift-7); }
.avatar.color-radio-11 { background: var(--shift-11); }

/* ------------------------------------------------------------
   Solicitudes: saldo de días
   ------------------------------------------------------------ */
.days-info {
  margin-top: 22px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 16px 18px 14px;
  text-align: left;
}
.user-available-days {
  display: block;
  font-size: 33.5px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--color-primary);
}
.days-info > p {
  margin: 4px 0 0;
  font-weight: 500;
  font-size: 12.5px;
  color: var(--color-text-muted);
}
.holiday-days-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
}
.holiday-days-info span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.holiday-days-info p {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
}
.holiday-days-info small {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* ------------------------------------------------------------
   Mini calendario (solicitudes)
   ------------------------------------------------------------ */
.calendar-month {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  font-size: 13px;
}
.calendar-month th,
.calendar-month td {
  width: 14.28%;
  text-align: center;
  padding: 8px 0;
  border-radius: 8px;
  position: relative;
}
.calendar-month th {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-faint);
  border-radius: 0;
}
.calendar-month td.today {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-weight: 700;
  border: 0;
}
.calendar-month td.festive {
  background: color-mix(in srgb, var(--shift-festive) 14%, var(--color-surface));
  color: var(--shift-festive);
  font-weight: 600;
  border: 0;
}
.calendar-month td.festive::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--shift-festive);
}
.calendar-month td.requestedHoliday {
  background: color-mix(in srgb, var(--color-ice) 34%, var(--color-surface));
  color: #a47917;
  font-weight: 600;
  border-radius: 0;
  border: 0;
}
html[data-theme="dark"] .calendar-month td.requestedHoliday { color: #e8c87f; }
.calendar-month td.acceptedHoliday {
  background: color-mix(in srgb, var(--color-success) 22%, var(--color-surface));
  color: var(--color-success-strong);
  font-weight: 600;
  border-radius: 0;
  border: 0;
}
html[data-theme="dark"] .calendar-month td.acceptedHoliday { color: var(--color-success-strong); }
.calendar-month td.requestedHoliday:first-child,
.calendar-month td.acceptedHoliday:first-child,
.calendar-month td:not(.requestedHoliday) + td.requestedHoliday,
.calendar-month td:not(.acceptedHoliday) + td.acceptedHoliday {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}
.calendar-month td.requestedHoliday:last-child,
.calendar-month td.acceptedHoliday:last-child,
.calendar-month td.requestedHoliday:not(:has(+ td.requestedHoliday)),
.calendar-month td.acceptedHoliday:not(:has(+ td.acceptedHoliday)) {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}
.calendar-month td.off { color: var(--color-text-faint); opacity: 0.7; }
.calendar-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.calendar-pair h4 {
  margin: 0 0 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-text);
}
.calendar-legend-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 22px 24px;
  border-top: 1px solid var(--color-border);
}
.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

/* Chips y leyendas de turno */
.legend-swatch,
.external-event {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  margin-bottom: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--chip-contrast);
}
.calendar-legend .external-event {
  display: inline-flex;
  width: auto;
  margin: 0;
  padding: 6px 14px;
}
.table .external-event {
  display: inline-flex;
  margin: 0;
  padding: 2px 10px;
  font-size: 11.5px;
  border-radius: 999px;
  white-space: nowrap;
}
.calendar-legend .requestedHoliday { background: var(--color-accent); color: #fff; }
.calendar-legend .acceptedHoliday { background: var(--color-success); color: #fff; }
.external-event.color-radio-5,
.external-event.color-radio-7,
.fc-event-chip.color-radio-5,
.fc-event-chip.color-radio-7,
.avatar.color-radio-5,
.avatar.color-radio-7 { color: #fff; }
.calendar-legend .festive { background: var(--shift-festive); }

/* Cifras del periodo (fichajes) */
.period-row {
  border: 0;
  border-radius: 0;
  overflow: visible;
  margin: 12px -12px 8px;
  padding-top: 0;
  display: flex;
  flex-wrap: wrap;
}
.period-row > [class*="col-"] { padding: 0 12px; }
.period-row .small-box {
  margin-bottom: 24px;
  border: var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: 18px 20px;
  min-height: 0;
  display: block;
}
.period-row .small-box .inner { display: block; }
.period-row .small-box .inner .period-figure {
  font-size: 23.5px;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin: 0 0 6px;
}
.period-row .small-box .inner h3 {
  margin: 0;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--color-text-muted);
}

/* Colores de turno (clases generadas por Laravel) */
.requestedHoliday { background: var(--color-primary-light); }
.acceptedHoliday { background: var(--color-success); }
.festive,
.color-radio-festive { background: var(--shift-festive); }
.color-radio-7 { background: var(--shift-7); }
.color-radio-1 { background: var(--shift-1); }
.color-radio-11 { background: var(--shift-11); }
.color-radio-5 { background: var(--shift-5); }
.color-radio-3 { background: var(--shift-3); }
.color-radio-2 { background: var(--shift-2); }
.color-radio-4 { background: var(--shift-4); }
.color-radio-9 { background: var(--shift-9); }
.color-radio-12 { background: var(--shift-12); }

/* ------------------------------------------------------------
   Cuadrante (calendario protagonista)
   ------------------------------------------------------------ */
.fc {
  background: var(--color-surface);
  border: var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: 20px 24px 24px;
  margin-bottom: 24px;
}
.fc-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  align-items: center;
}
.fc-left { display: flex; gap: 8px; align-items: center; }
.fc-button-group {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 0;
  border-radius: 999px;
  background: var(--color-primary-soft);
}
.fc-button {
  min-height: 36px;
  padding: 0 18px;
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
  border-radius: 999px;
  font: 600 13px var(--font);
  cursor: pointer;
  transition: background 140ms var(--ease), color 140ms var(--ease), box-shadow 140ms var(--ease);
}
.fc-button:hover {
  color: var(--color-text);
  background: color-mix(in srgb, var(--color-surface) 70%, transparent);
}
.fc-button.fc-nav,
.fc-button.fc-today-button {
  background: var(--color-primary-soft);
  color: #c19739;
}
.fc-button.fc-nav {
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
}
.fc-button.fc-nav:hover,
.fc-button.fc-today-button:hover {
  background: color-mix(in srgb, #c19739 16%, var(--color-surface));
  color: #c19739;
  border-color: transparent;
}
html[data-theme="dark"] .fc-button.fc-nav,
html[data-theme="dark"] .fc-button.fc-today-button,
html[data-theme="dark"] .fc-button.fc-nav:hover,
html[data-theme="dark"] .fc-button.fc-today-button:hover {
  color: #e8c87f;
}
.fc-left .fc-nav { border-radius: 999px; }
.fc-button-group .fc-button {
  color: #c19739;
  box-shadow: none;
}
.fc-button-group .fc-button:hover {
  color: #c19739;
  background: transparent;
}
.fc-button-group .fc-state-active,
.fc-button-group .fc-button.fc-state-active {
  background: #c19739;
  color: #fff;
  box-shadow: none;
}
html[data-theme="dark"] .fc-button-group .fc-button,
html[data-theme="dark"] .fc-button-group .fc-button:hover { color: #e8c87f; }
html[data-theme="dark"] .fc-button-group .fc-button.fc-state-active {
  background: #c19739;
  color: #fff;
}
.fc-state-disabled {
  opacity: 0.45;
  cursor: default;
}
.fc-toolbar strong {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-text);
}
.fc-weekdays,
.fc-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.fc-weekdays span {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-text-faint);
  text-align: center;
  padding: 6px 0;
}
.fc-day {
  min-height: 92px;
  border-radius: var(--radius-sm);
  padding: 8px;
  background: transparent;
}
.fc-days .fc-day:nth-child(7n),
.fc-days .fc-day:nth-child(7n - 1) {
  background: color-mix(in srgb, var(--color-text) 3%, transparent);
}
.fc-day.is-today {
  background: var(--color-primary-soft);
}
.fc-day.is-off { opacity: 0.42; }
.fc-day .num {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
}
.fc-day.is-today .num { color: var(--color-primary); }
.fc-event-chip {
  display: block;
  margin-top: 6px;
  padding: 4px 16px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--chip-contrast);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ------------------------------------------------------------
   Modales
   ------------------------------------------------------------ */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(16, 24, 40, 0.5);
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
  overscroll-behavior: contain;
}
.modal.in { display: flex; align-items: center; }
.modal-dialog {
  width: min(520px, 100%);
  max-width: 100%;
  max-height: calc(100dvh - 32px);
  min-width: 0;
  min-height: 0;
  margin: auto;
  display: flex;
  flex-direction: column;
}
.modal-content {
  background: var(--color-surface);
  border: var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal.in .modal-content { animation: modal-in 180ms var(--ease); }
@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.modal-header,
.modal-body,
.modal-footer {
  padding: 18px 24px;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--color-border);
}
.modal-title { margin: 0; min-width: 0; font-size: 18px; font-weight: 600; }
.modal-title:focus { outline: none; }
.close {
  background: none;
  border: 0;
  font-size: 22.5px;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text-muted);
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-sm);
}
.close:hover { background: var(--color-surface-sunken); }
.modal-header,
.modal-footer { flex: 0 0 auto; }
.modal-body {
  overflow-x: clip;
  overflow-y: auto;
  min-height: 0;
}
.modal-body p { margin-top: 0; }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--color-border);
}
.modal-footer .pull-left { margin-right: auto; float: none; }
.modal-dialog.modal-lg { width: min(760px, 100%); max-width: 100%; }
.modal .input-group { min-width: 0; max-width: 100%; }
.modal .input-group .form-control { min-width: 0; flex: 1 1 auto; }
.modal .days-info { margin-top: 0; }
.diary-time {
  display: flex;
  align-items: center;
  gap: 4px;
}
.diary-time .input-group { flex: 1 1 auto; min-width: 0; }
.diary-remove,
.diary-remove:hover,
.diary-remove:focus {
  background: none;
  color: var(--color-danger);
  min-width: 36px;
  padding: 0 4px;
  font-size: 22px;
  line-height: 1;
  box-shadow: none;
}
#editDiariesContainer:not(:empty) { margin-top: 4px; }
#editHolidayDocuments:not(:empty) { margin-top: 12px; }
body.modal-open { overflow: hidden; }

/* ------------------------------------------------------------
   Reloj (Control de presencia) — mismo layout aprobado:
   la barra y las stats terminan justo antes de la columna
   de botones (88 px a la derecha), nunca al borde de la card.
   ------------------------------------------------------------ */

/* Panel de ajustes del fichaje, plegable desde la cabecera. */
.clock-settings-panel {
  overflow: hidden;
}
.clock-settings-panel[hidden] {
  display: none !important;
}
/* El interruptor de ajustes vive en la barra de titulo: sin el relleno
   alto que necesita el del tema, para no descuadrar la cabecera. */
.clock-settings-switch {
  min-height: 32px;
  padding: 0;
  gap: 0;
}
.clock-settings-switch .icon {
  opacity: 0.75;
  margin-right: 8px;
}
/* ------------------------------------------------------------
   Filas de coste adicional / materiales del modal de fichajes.
   Antes iban con estilos inline (background #fff, 10-12px,
   24px de alto) que se saltaban el tema: en oscuro salian
   cajas blancas y botones minusculos. Ahora todo sale de tokens.
   ------------------------------------------------------------ */

/* Sin caja: los campos van sueltos, alineados con el resto del bloque. */
/* ------------------------------------------------------------
   Modal de edicion de fichaje.
   - Se adapta al contenido; solo hace scroll si supera la pantalla.
   - Cabecera y pie siempre visibles.
   - Papelera alineada con los campos de su fila.
   ------------------------------------------------------------ */
/* El modal de fichajes lleva 5 campos por fila: sube a 1280px y nunca
   baja de 1024 mientras quepan; por debajo se adapta al viewport. */
.modal-dialog.edit-diaries-dialog {
  width: min(1280px, calc(100vw - 32px));
  min-width: min(1024px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  /* Por encima de la barra superior y de cualquier desplegable abierto. */
  z-index: 1060;
}

#editDiariesModal {
  z-index: 1055;
}

/* Por debajo de 1024 el minimo deja de aplicar y el modal se adapta. */
@media (max-width: 1055px) {
  .modal-dialog.edit-diaries-dialog {
    width: calc(100vw - 24px);
    min-width: 0;
    max-width: calc(100vw - 24px);
    margin: 12px auto;
  }
}

@media (max-width: 575px) {
  .modal-dialog.edit-diaries-dialog {
    width: 100vw;
    min-width: 0;
    max-width: 100vw;
    margin: 0;
  }
}

#editDiariesModal .modal-content {
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
}

#editDiariesModal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 20px;
}

/* La fila de la franja se resuelve con flex en lugar de columnas de
   Bootstrap: las columnas sumaban 12 justas y la papelera se caia a la
   linea siguiente. Con flex los campos se reparten y la papelera
   comparte linea con ellos. */
#editDiariesModal #editDiariesContainer .row.form-group[id^="line-"] {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-left: 0;
  margin-right: 0;
}

#editDiariesModal #editDiariesContainer .row.form-group[id^="line-"] > [class*="col-"] {
  /* Base minima: con flex-basis 0 los campos se encogian sin limite y
     nunca saltaban de linea. Con 150px saltan cuando no caben. */
  flex: 1 1 150px;
  min-width: 150px;
  width: auto;
  max-width: none;
  float: none;
  padding: 0;
}

/* La papelera no crece: mantiene 44px y se alinea con los campos.
   El !important gana al min-width: 150px de las columnas de la fila. */
#editDiariesModal .delete-cell {
  flex: 0 0 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0;
  float: none;
}

#editDiariesModal .delete-cell .delete-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#editDiariesModal .delete-cell .delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
}

/* ------------------------------------------------------------
   Costes adicionales del modal de fichajes.
   Una fila por coste: importe, descripcion y papelera, alineados
   en una sola linea con la misma altura de campo que el resto.
   ------------------------------------------------------------ */
#editDiariesModal .other-costs-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#editDiariesModal .other-cost-row-modal {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

#editDiariesModal .other-cost-row-modal .other-cost-input {
  flex: 0 0 140px;
  text-align: right;
}

#editDiariesModal .other-cost-row-modal .other-cost-description {
  flex: 1 1 auto;
  min-width: 0;
}

/* La papelera del coste no se encoge y mide lo mismo que la de la franja. */
#editDiariesModal .other-cost-row-modal .remove-other-cost-btn {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* El boton de anadir vive dentro de la ultima fila: comparte linea con los
   campos, alineado a su base y sin empujar el layout. */
#editDiariesModal .add-other-cost-btn,
.add-other-cost-btn.add-cost-inline {
  flex: 0 0 auto;
  align-self: flex-end;
  min-height: 44px;
  padding: 0 16px;
  font-size: 13px;
  white-space: nowrap;
}

/* Cuando aun no hay filas, el boton queda solo en el contenedor. */
#editDiariesModal .other-costs-container > .add-other-cost-btn {
  align-self: flex-start;
  margin-top: 0;
}

/* En pantallas estrechas la fila de coste se parte en dos lineas:
   importe + descripcion arriba, boton de anadir abajo. */
@media (max-width: 767px) {
  #editDiariesModal .other-cost-row-modal {
    flex-wrap: wrap;
    gap: 8px;
  }

  #editDiariesModal .other-cost-row-modal .other-cost-input {
    flex: 1 1 80px;
    min-width: 0;
  }

  #editDiariesModal .other-cost-row-modal .other-cost-description {
    flex: 2 1 140px;
    min-width: 0;
  }

  #editDiariesModal .other-cost-row-modal .remove-other-cost-btn {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
  }

  /* El boton de anadir ocupa su propia linea y se adapta al ancho. */
  #editDiariesModal .other-cost-row-modal .add-other-cost-btn {
    flex: 1 1 100%;
    width: 100%;
    min-height: 40px;
    justify-content: center;
  }
}
.other-cost-row-modal {
  display: flex;
  align-items: center;
  gap: 10px;
}

.other-cost-row-modal .other-cost-input {
  flex: 0 0 110px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.other-cost-row-modal .other-cost-description {
  flex: 1 1 auto;
  min-width: 0;
}

/* Botones de accion dentro del modal: mismo alto y tipografia que
   los campos, para que no haya piezas de 10px junto a otras de 44px. */
.other-cost-row-modal .remove-other-cost-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 14px;
  line-height: 1;
}

.other-costs-actions {
  margin-top: 10px;
}

.btn.add-other-cost-btn,
#clockSettingsPanel .btn.add-other-cost-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

/* En pantallas estrechas la fila de coste pasa a dos lineas. */
@media (max-width: 767px) {
  .other-cost-row-modal {
    flex-wrap: wrap;
  }
  .other-cost-row-modal .other-cost-input {
    flex: 0 0 100%;
    text-align: left;
  }
}

.clock-widget {
  position: relative;
  background: var(--color-surface);
  color: var(--color-text);
  border: var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: 0;
  margin-bottom: 24px;
}
.clock-widget .box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 24px 14px;
}
.clock-widget .box-header.with-border {
  margin-bottom: 0;
  border-bottom: 1px solid var(--color-border);
}
.clock-widget .box-title {
  color: var(--color-text);
}
.clock-widget .box-tools {
  position: static;
  display: flex;
  align-items: center;
  margin: 0;
}
.clock-widget .box-body {
  padding: 6px 24px 24px 24px;
}
.clock-widget #durationStr,
.clock-widget .duration-display {
  font-size: 41px;
  font-weight: 600;
  letter-spacing: -0.02em;
  display: block;
  margin: 0;
  line-height: 1.1;
  color: var(--color-text);
}
.clock-widget .progress { margin: 18px 0 0; }
.clock-track {
  position: relative;
  display: flow-root;
}
.clock-track > .btn-edit-clock {
  position: absolute;
  z-index: 1;
  right: 0;
  top: 60px;
}
.clock-widget .progress-bar,
.clock-widget .progress-bar-green { background: var(--color-primary); }

.clock-stats {
  margin: 0;
  padding: 0 88px 0 0; /* termina justo antes del botón editar */
  display: flex;
  flex-wrap: wrap;
}
.clock-stats:before,
.clock-stats:after {
  display: none;
  content: none;
}
.clock-stats > [class*="col-"] {
  padding: 0 24px;
  flex: 0 0 33.333%;
  max-width: 33.333%;
  line-height: 1.3;
}
.clock-stats > [class*="col-"]:first-child { padding-left: 0; }
.clock-stats > [class*="col-"]:last-child { padding-right: 0; }
.clock-stats .stat-lbl {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-text-faint);
}
.clock-stats .stat-val {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
}

#play {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  flex: 0 0 44px;
  border-radius: 999px;
  padding: 0;
  border: 0;
  background: var(--color-primary);
  color: #fff;
}
#play:hover,
#play:focus {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: #fff;
}
#play:active { background: var(--color-primary-active); }

.icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#play .icon {
  position: absolute;
  inset: 0;
  width: 22px;
  height: 22px;
  margin: auto;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 180ms var(--ease), transform 220ms var(--ease);
}
.icon-play path { fill: currentColor; stroke: none; }
.icon-pause rect { fill: currentColor; stroke: none; }
#play[aria-pressed="true"] .icon-pause,
#play[aria-pressed="false"] .icon-play {
  opacity: 1;
  transform: scale(1);
}
#play[aria-pressed="false"] .icon-play { transform: translateX(1px) scale(1); }

/* Editar fichaje: botón secundario de icono */
.btn-edit-clock {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-soft);
  border: 0;
  color: #c19739;
}
.btn-edit-clock:hover,
.btn-edit-clock:focus {
  background: color-mix(in srgb, #c19739 16%, var(--color-surface));
  border-color: transparent;
  color: #c19739;
}
.btn-edit-clock .icon { width: 20px; height: 20px; }

/* ------------------------------------------------------------
   Ayuda
   ------------------------------------------------------------ */
.help-index {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.help-index a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 18px;
  border: var(--card-border);
  border-radius: var(--radius-md);
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  min-height: 44px;
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}
.help-index a .icon {
  width: 16px;
  height: 16px;
  color: var(--color-primary);
}
.help-index a:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}
.manual-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 16px 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.help-section { margin-top: 36px; }
.help-section h3 {
  font-size: 18.5px;
  letter-spacing: -0.02em;
}
.help-videos {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
}
.help-videos li { margin-bottom: 6px; }
.help-videos a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 600;
}
.help-videos a .icon {
  width: 16px;
  height: 16px;
  color: var(--color-primary);
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 767px) {
  .main-header .logo {
    width: auto;
    flex: 0 0 auto;
    padding: 8px 16px;
    min-width: 0;
  }
  .main-header .logo img {
    width: 80px;
    max-width: 80px;
    height: auto;
    max-height: none;
  }
  .navbar { padding: 0 8px; }
  .sidebar-toggle { flex: 0 0 44px; }
  .theme-switch,
  .navbar-custom-menu,
  .dropdown-toggle { flex-shrink: 0; }
  .modal-header,
  .modal-body,
  .modal-footer { padding: 16px; }
  .modal-footer .btn { padding-left: 14px; padding-right: 14px; }
  .main-sidebar { transform: translateX(-100%); }
  body.sidebar-open .main-sidebar { transform: translateX(0); }
  body.sidebar-open .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    top: var(--header-h);
    z-index: 1010;
    background: rgba(16, 24, 40, 0.45);
  }
  .content-wrapper,
  .main-footer {
    margin-left: 0;
    padding-left: 16px;
    padding-right: 16px;
  }
  .content-wrapper {
    padding-top: 20px;
    padding-bottom: 40px;
  }
  .clock-widget .box-header { padding: 20px 20px 12px; }
  .clock-widget .box-body { padding: 4px 20px 20px 20px; }
  .clock-widget .box-tools { right: 16px; }
  .clock-widget #durationStr,
  .clock-widget .duration-display { font-size: 32px; }
  .clock-stats { padding-right: 72px; }
  .clock-stats > [class*="col-"] {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    padding: 0 10px;
  }
  .clock-stats .stat-val { font-size: 15px; }
  .box-header,
  .box-body { padding-left: 20px; padding-right: 20px; }
  .nav-tabs {
    margin: 14px 20px 16px;
    padding: 4px;
  }
  .calendar-pair { grid-template-columns: 1fr; }
  .help-index { grid-template-columns: 1fr; }
  .navbar-custom-menu .user-menu span:not(.user-initials) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
  }
  .fc { padding: 16px; }
  .fc-toolbar strong { font-size: 16px; }
  .fc-day { min-height: 64px; padding: 6px; }
  .fc-week-view .fc-day { min-height: 96px; }
  .fc-button { padding: 0 14px; }
  .period-row .small-box { margin-bottom: 12px; }
}

@media (max-width: 360px) {
  .theme-switch { padding: 0 4px; gap: 4px; }
  .modal-footer { gap: 6px; }
  .modal-footer .btn { padding-left: 10px; padding-right: 10px; }
}

@media (min-width: 768px) {
  body.sidebar-collapse .main-sidebar { transform: translateX(-100%); }
  body.sidebar-collapse .content-wrapper,
  body.sidebar-collapse .main-footer { margin-left: 0; }
}

/* Pantallas grandes (>1920px): tipografía ~115%, sidebar 248→276 */
@media (min-width: 1921px) {
  :root,
  html[data-theme="light"],
  html[data-theme="dark"] { --sidebar-w: 270px; }
  .main-header .logo img { max-width: 176px; max-height: 36px; }
  .sidebar-menu .nav-icon { width: 22px; height: 22px; flex: 0 0 22px; }
  .user-panel .profile-photo { width: 44px; height: 44px; flex-basis: 44px; }
  .user-menu > a,
  .user-menu > button.dropdown-toggle { font-size: 15px; }
  .user-initials { font-size: 14px; }
  .user-panel .image,
  .user-panel .profile-photo { font-size: 15px; }
  .user-panel .info p { font-size: 15px; }
  .sidebar-menu .header { font-size: 13px; }
  .sidebar-menu li a { font-size: 16px; }
  body { font-size: 17px; }
  .content-header h1 { font-size: 25.5px; }
  .content-header .content-description { font-size: 16px; }
  .content-header .breadcrumb { font-size: 14px; }
  .box-title { font-size: 17px; }
  .small-box .inner h3 { font-size: 32px; }
  .kpi-label { font-size: 14px; }
  .kpi-meta { font-size: 13.5px; }
  .stat-val { font-size: 22.5px; }
  .stat-lbl { font-size: 13.5px; }
  .btn { font-size: 15.5px; }
  .btn-sm { font-size: 14px; }
  label { font-size: 14px; }
  .table { font-size: 16px; }
  .table thead th { font-size: 13.5px; }
  .status-pill { font-size: 13px; }
  .clock-widget #durationStr,
  .clock-widget .duration-display { font-size: 47px; }
  .clock-widget .box-title { font-size: 17px; }
  .clock-stats .stat-lbl { font-size: 13px; }
  .clock-stats .stat-val { font-size: 20.5px; }
  .period-row .small-box .inner .period-figure { font-size: 27px; }
  .period-row .small-box .inner h3 { font-size: 14px; }
  .user-available-days { font-size: 56px; }
  .calendar-month { font-size: 15px; }
  .fc-toolbar strong { font-size: 19.5px; }
  .fc-button { font-size: 15px; }
  .fc-weekdays span { font-size: 13.5px; }
  .fc-day .num { font-size: 14px; }
  .fc-event-chip { font-size: 13.5px; }
  .external-event { font-size: 14.5px; }
  .table .external-event { font-size: 13.5px; }
  .modal-title { font-size: 20.5px; }
  .help-section h3 { font-size: 21.5px; }
  .main-footer { font-size: 15px; }
  .presence-group h4 { font-size: 14.5px; }
  .users-list a { font-size: 14.5px; }
  .festive-list li { font-size: 14.5px; }
  .event-date span { font-size: 17px; }
  .event-date small { font-size: 12px; }
  .event-meta { font-size: 13.5px; }
}

/* ============================================================
   v5 — alma: atmósfera, reloj como instrumento, widgets con luz
   ============================================================ */
::selection { background: #f6e7c5; color: #86661e; }
html[data-theme="dark"] ::selection { background: #1b4d6e; color: #fff; }

.box,
.small-box,
.fc {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.75) inset,
    0 10px 28px rgba(23, 48, 78, 0.07);
}
html[data-theme="dark"] .box,
html[data-theme="dark"] .small-box,
html[data-theme="dark"] .fc {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.small-box {
  overflow: hidden;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease);
}
.small-box:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 16px 36px rgba(23, 48, 78, 0.1);
}
/* TKT-0198 (IM-0041): las tintas de los widgets KPI usan valores GEMELOS de
   los tonos de marca (mismo color visual, distinto hex a propósito) para NO
   ser sustituidos por la paleta corporativa de App\Support\CorporatePalette:
   los títulos de tarjetas conservan su diferenciación azul/teal/navy aunque
   el tenant configure ENTITY_PRIMARY_COLOR. No "normalizar" estos hexes. */
.row-kpis .widget-hours { --kpi-ink: #0b93d6; }
.row-kpis .widget-next { --kpi-ink: #387dc0; }
.row-kpis .widget-balance { --kpi-ink: #5dbcb4; }
.row-kpis .widget-requests { --kpi-ink: #1664a3; }
html[data-theme="dark"] .row-kpis .widget-hours { --kpi-ink: #0b93d6; }
html[data-theme="dark"] .row-kpis .widget-next { --kpi-ink: #7eb4e7; }
html[data-theme="dark"] .row-kpis .widget-balance { --kpi-ink: #5dbcb4; }
html[data-theme="dark"] .row-kpis .widget-requests { --kpi-ink: #0b93d6; }
.row-kpis .kpi-label { color: var(--kpi-ink); }
.row-kpis .small-box .inner h3,
.row-kpis .small-box-footer { color: var(--color-text); }
.row-kpis .status-pill {
  background: none;
  border: 1px solid var(--kpi-ink);
  color: var(--kpi-ink);
}

.period-row .small-box { overflow: hidden; }
.period-row .widget-next .period-figure { color: #e39d00; }
.period-row .widget-balance .period-figure { color: var(--color-success-strong); }
.period-row .widget-requests .period-figure { color: #1664a3; }
.period-row .widget-requests .period-figure.text-danger { color: var(--color-danger); }

.clock-readout {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  padding-top: 24px;
}
.day-ring {
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
}
.day-ring-track {
  fill: none;
  stroke: color-mix(in srgb, var(--color-accent) 18%, var(--color-border));
  stroke-width: 7;
}
.day-ring-value {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 226.2;
  transform: rotate(-90deg);
  transform-origin: 44px 44px;
}
.day-ring text {
  fill: var(--color-primary);
  font: 700 12px var(--font);
}
.clock-widget .progress {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: color-mix(in srgb, var(--color-accent) 14%, var(--color-border));
}
.clock-widget .progress-bar,
.clock-widget .progress-bar-green {
  border-radius: 999px;
  background: var(--color-accent);
}
.external-event,
.fc-event-chip {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.fc-day.is-today { background: var(--color-primary-soft); }
.event-date {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.sidebar-menu li.active a {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-primary) 18%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .theme-switch-thumb { transition: none; }
  .modal.in .modal-content { animation: none; }
}

.clock-stats .stat-lbl,
.clock-stats .stat-val { line-height: 1.3; }
.clock-widget .progress + .clock-stats { margin-top: 24px; }
.clock-stats + .clock-stats { margin-top: 12px; }

/* shifts-date */
.shifts-date {
  position: fixed;
  z-index: 2000;
  width: 292px;
  padding: 14px 14px 12px;
  background: var(--color-surface);
  color: var(--color-text);
  border: var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-family: var(--font);
}
.shifts-date-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.shifts-date-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.shifts-date-nav {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--color-surface-sunken);
  color: var(--color-text-muted);
  cursor: pointer;
}
.shifts-date-nav svg { width: 16px; height: 16px; }
.shifts-date-nav:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}
.shifts-date-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.shifts-date-dow {
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-faint);
}
.shifts-date-day {
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text);
  font: 500 13px/1 var(--font);
  cursor: pointer;
}
.shifts-date-day:hover { background: var(--color-surface-sunken); }
.shifts-date-day.is-out { color: var(--color-text-faint); }
.shifts-date-day.is-today {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-weight: 700;
}
.shifts-date-day.is-selected,
.shifts-date-day.is-selected:hover {
  background: var(--color-primary);
  color: var(--color-on-accent);
}
#datesError:empty { display: none; }

/* Selector de hora del modal: los botones del tema no deben convertir las flechas en óvalos vacíos */
.bootstrap-datetimepicker-widget {
  width: auto;
  min-width: 16rem;
  padding: 10px 12px 12px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-surface);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
}
.bootstrap-datetimepicker-widget table td {
  height: auto;
  padding: 2px;
  border: 0;
  background: transparent;
}
.bootstrap-datetimepicker-widget table td span {
  width: auto;
  height: auto;
  margin: 0;
  line-height: 1.2;
  border-radius: 0;
  background: transparent;
}
.bootstrap-datetimepicker-widget table td .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 32px;
  min-width: 40px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--color-surface-sunken);
  color: var(--color-text);
  box-shadow: none;
}
.bootstrap-datetimepicker-widget table td .btn:hover,
.bootstrap-datetimepicker-widget table td .btn:focus {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}
.bootstrap-datetimepicker-widget .timepicker-hour,
.bootstrap-datetimepicker-widget .timepicker-minute,
.bootstrap-datetimepicker-widget .timepicker-second {
  display: inline-block;
  min-width: 2.4ch;
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  color: var(--color-text);
}
.bootstrap-datetimepicker-widget .separator {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-muted);
}
.bootstrap-datetimepicker-widget .glyphicon-chevron-up::before,
.bootstrap-datetimepicker-widget .glyphicon-chevron-down::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  font-size: 0;
}
.bootstrap-datetimepicker-widget .glyphicon-chevron-up::before {
  border-width: 0 5px 6px 5px;
  border-color: transparent transparent currentColor transparent;
}
.bootstrap-datetimepicker-widget .glyphicon-chevron-down::before {
  border-width: 6px 5px 0 5px;
  border-color: currentColor transparent transparent transparent;
}

/* Selector de hora: sin viñeta y flechas visibles */
.bootstrap-datetimepicker-widget ul,
.bootstrap-datetimepicker-widget li {
  list-style: none;
  margin: 0;
  padding: 0;
}
.bootstrap-datetimepicker-widget table { margin: 0 auto; }
.bootstrap-datetimepicker-widget table td .btn {
  width: 36px;
  height: 28px;
  min-width: 36px;
  min-height: 28px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
}
.bootstrap-datetimepicker-widget .glyphicon {
  display: block;
  width: 14px;
  height: 8px;
}
.bootstrap-datetimepicker-widget .glyphicon-chevron-up::before {
  border-width: 0 7px 8px 7px;
}
.bootstrap-datetimepicker-widget .glyphicon-chevron-down::before {
  border-width: 8px 7px 0 7px;
}

/* Diferencia positiva: signo y verde */
.table-diaries .diff-pos { color: var(--color-success); font-weight: 600; }
.period-row .widget-requests .period-figure.text-success,
html[data-theme="light"] .period-row .widget-requests .period-figure.text-success {
  color: var(--color-success);
}

.request-docs > .row:first-child { display: none; }

#newHolidayRequestForm .form-group:has(#datesError:empty) { margin-bottom: 0; }

/* FullCalendar no hereda la rejilla del cuadrante del trabajador */
.fc:has(.fc-view-container) {
  padding: 12px 16px 16px;
}
.fc-view-container .fc-day,
.fc-bg .fc-day,
.fc-day-grid .fc-day,
.fc-day-grid .fc-widget-content {
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  opacity: 1;
}
.fc .fc-event {
  background: var(--color-primary);
  background-color: var(--color-primary);
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  margin: 1px 2px;
}
.fc-event .fc-content,
.fc-event .fc-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.team-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.input-group-addon .icon {
  width: 16px;
  height: 16px;
}

.fc-month-only,
.fc-week-only,
.fc-day-only { display: none; }
#calendar[data-view="month"] .fc-month-only,
#calendar[data-view="week"] .fc-week-only,
#calendar[data-view="day"] .fc-day-only { display: block; }
.fc-day-only .fc-day { min-height: 160px; }
.fc-day-only .num { font-size: 14px; margin-bottom: 4px; }
.fc-day-only .fc-event-chip { display: inline-block; margin-top: 12px; padding: 8px 16px; font-size: 13px; }
.fc-day-only .shift-span { display: block; margin-top: 10px; font-size: 13px; font-weight: 500; color: var(--color-text-muted); }

.table-users td,
.table-users th { vertical-align: middle; }
.table-users .user-thumb-cell { width: 56px; padding-right: 0; }
.table-users .profile-photo {
  width: 40px;
  height: 40px;
  max-width: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  object-fit: cover;
  flex: 0 0 40px;
}
.table-users tbody td a { font-weight: 600; color: var(--color-text); text-decoration: none; }
.table-users tbody td a:hover { color: var(--color-primary); }
.table-users .user-team {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-text-muted);
  font-style: normal;
}
.table .sorting_1 .profile-photo {
  width: 40px;
  height: 40px;
  max-width: 40px;
  object-fit: cover;
}

.users-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 16px;
}
.users-toolbar form { margin: 0; max-width: 100%; }
.users-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}
.users-filters .input-group { margin: 0; width: auto; }
.users-filters .form-control { height: 36px; min-width: 200px; }
.users-filters .input-group-btn .btn {
  height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.table-users { margin-bottom: 0; }

.input-group:not(:has(.input-group-addon)) .form-control {
  border-radius: 10px;
}
.input-group:has(.input-group-btn) {
  gap: 8px;
  align-items: center;
}
.users-filters { gap: 12px; }

@media (min-width: 992px) {
  .row > .col-md-5 { flex-basis: 41.666%; max-width: 41.666%; }
  .row > .col-md-7 { flex-basis: 58.333%; max-width: 58.333%; }
}
.profile-hero .profile-photo,
.profile-thumb .profile-photo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  object-fit: cover;
}
.profile-hero .profile-photo {
  width: 96px;
  height: 96px;
  max-width: 96px;
}
.profile-thumb .profile-photo {
  width: 64px;
  height: 64px;
  max-width: 64px;
}
.profile-hero { margin-bottom: 8px; }

.profile-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.9fr);
  gap: 28px;
  align-items: start;
}
.profile-main,
.profile-side,
.profile-wide { min-width: 0; }
.profile-wide { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.profile-page .profile-main .content-header { display: none; }
.profile-page .row { margin-left: 0; margin-right: 0; }
.profile-page .box,
.profile-page .table-responsive { max-width: 100%; }
.profile-page h1.pull-left { float: none; }
.profile-section-title {
  display: block;
  margin: 12px 0 4px;
  padding: 8px 0 14px;
  border-bottom: 1px solid var(--color-border);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--color-text);
}
.form-group > label:has(+ span.required) {
  display: inline;
  margin-bottom: 0;
}
span.required {
  color: var(--color-danger);
  font-weight: 700;
  font-size: 12.5px;
  margin-left: 4px;
  line-height: 1;
}
.form-group > span.required + .form-control,
.form-group > span.required + input,
.form-group > span.required + select,
.form-group > span.required + textarea {
  display: block;
  margin-top: 6px;
}
@media (max-width: 991px) {
  .profile-columns { grid-template-columns: minmax(0, 1fr); }
}

.profile-page .row { margin-left: -12px; margin-right: -12px; }
.profile-page .box-body > .row > form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  width: 100%;
  flex: 1 1 100%;
  min-width: 0;
}
.profile-page .box-body > .row > form > [class*=col-] {
  padding: 0 12px;
  flex: 0 0 100%;
  max-width: 100%;
  box-sizing: border-box;
}
@media (min-width: 768px) {
  .profile-page .box-body > .row > form > .col-sm-2 { flex-basis: 16.666%; max-width: 16.666%; }
  .profile-page .box-body > .row > form > .col-sm-3 { flex-basis: 25%; max-width: 25%; }
  .profile-page .box-body > .row > form > .col-sm-4 { flex-basis: 33.333%; max-width: 33.333%; }
  .profile-page .box-body > .row > form > .col-sm-6 { flex-basis: 50%; max-width: 50%; }
  .profile-page .box-body > .row > form > .col-sm-8 { flex-basis: 66.666%; max-width: 66.666%; }
  .profile-page .box-body > .row > form > .col-sm-12 { flex-basis: 100%; max-width: 100%; }
}
.profile-page .box-body > .row > form > .clearfix { flex: 0 0 100%; height: 0; padding: 0; margin: 0; }
.profile-page .box-body > .row > form > .form-group:has(.profile-hero) { flex-basis: 100%; max-width: 100%; }

.profile-wide { gap: 20px; }
.profile-page .box-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.profile-page .box-body > .row > form > .col-sm-2,
.profile-page .box-body > .row > form > .col-sm-3,
.profile-page .box-body > .row > form > .col-sm-4,
.profile-page .box-body > .row > form > .col-sm-6,
.profile-page .box-body > .row > form > .col-sm-8 {
  flex-basis: 50%;
  max-width: 50%;
}
.profile-page .box-body > .row > form > .form-group:has(.profile-hero),
.profile-page .box-body > .row > form > .form-group:has(.profile-section-title),
.profile-page .box-body > .row > form > .form-group:has(#photo),
.profile-page .box-body > .row > form > .col-sm-12 {
  flex-basis: 100%;
  max-width: 100%;
}
.profile-page .box-body > .row > form > .form-group:has(input[type="checkbox"]) {
  flex: 0 0 auto;
  max-width: none;
  width: auto;
  display: flex;
  align-items: center;
  margin: 0 28px 16px 0;
}
.profile-page .checkbox.icheck {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  min-height: 28px;
}
.profile-page .checkbox.icheck label { display: inline; margin: 0; }
.profile-page .form-group:has(#photo) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}
.profile-page .form-group:has(#photo) > label { flex: 1 0 100%; margin: 0; }
.profile-page .form-group:has(#photo) .clearfix { display: none; }
.profile-page .form-group:has(#photo) .col-sm-3,
.profile-page .form-group:has(#photo) .col-sm-9 {
  float: none;
  width: auto;
  max-width: none;
  padding: 0;
  flex: 0 0 auto;
}
.profile-page .form-group:has(#photo) .profile-photo { width: 48px; height: 48px; font-size: 16px; }
.profile-page .box-documents form { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.profile-page .box-documents input[type="submit"] { align-self: flex-end; float: none; margin: 0; }
.profile-page .box-documents .panel-group { display: flex; flex-direction: column; gap: 28px; margin: 8px 0 0; }
.profile-page .box-documents .panel { margin: 0; border: 0; background: transparent; box-shadow: none; }
.profile-page .box-documents .panel-heading { padding: 0 0 10px; background: transparent; border: 0; border-bottom: 1px solid var(--color-border); }
.profile-page .box-documents .panel-title { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.profile-page .box-documents .panel-title a { color: var(--color-text); text-decoration: none; }
.profile-page .box-documents .panel-collapse,
.profile-page .box-documents .collapse { display: block; height: auto; }
.profile-page .box-documents .panel-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  margin: 0;
  border-bottom: 1px solid var(--color-border);
}
.profile-page .box-documents .panel-body::before,
.profile-page .box-documents .panel-body::after { content: none; display: none; }
.profile-page .box-documents .panel-body > [class*="col-"] { float: none; width: auto; padding: 0; }
.profile-page .box-documents .panel-body > .col-sm-11 { flex: 1; min-width: 0; }
.profile-page .box-documents .panel-body > .col-sm-1 { flex: 0 0 auto; }
.profile-page .box-documents .panel-body .col-sm-11 > a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--color-text);
}
.profile-page .box-documents .panel-body .row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--color-text-muted);
}
.profile-page .box-documents .btn-group { display: flex; align-items: center; gap: 8px; }
.profile-page .box-documents .glyphicon { display: none; }
.profile-page .table-sidebar { width: 100%; border-collapse: collapse; }
.profile-page .table-sidebar th,
.profile-page .table-sidebar td { text-align: left; vertical-align: middle; }

"""""""""".profile-page .box-documents br { display: none; }
.profile-page .box-documents .document-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-top: 4px;
}
.profile-page .box-documents .document-box > .form-group,
.profile-page .box-documents .document-box > .col-sm-1 {
  float: none;
  width: auto;
  max-width: none;
  padding: 0;
}
.profile-page .box-documents .document-box > .form-group { flex: 1; }
.profile-page .box-documents .document-box > .col-sm-1 { padding-top: 28px; }
.profile-page .box-documents .btn-group button.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--color-danger);
}
.profile-page .box-documents .btn-group button.btn-link .icon { width: 18px; height: 18px; }
.profile-page .box-documents .btn-group button.btn-link:hover,
.profile-page .box-documents .btn-group button.btn-link:focus { background: var(--color-danger-soft); }
.profile-page .table-sidebar th:last-child,
.profile-page .table-sidebar td:last-child {
  text-align: right;
  width: 1%;
  white-space: nowrap;
}

#newHolidayRequestForm .request-accept,
#newPlanningRequestForm .request-accept {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  min-height: 22px;
  width: auto;
  clear: both;
}
#newHolidayRequestForm .request-accept,
#newPlanningRequestForm .request-accept [class*="icheckbox"] {
  position: relative !important;
  display: inline-block !important;
  flex: 0 0 18px;
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  top: auto !important;
  left: auto !important;
}
#newHolidayRequestForm .request-accept,
#newPlanningRequestForm .request-accept label {
  display: inline !important;
  flex: 0 1 auto;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
  cursor: pointer;
}
.profile-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.profile-side > .content { margin: 0; min-height: 0 !important; }
.profile-side .box { margin-bottom: 0; }
.profile-side .table-sidebar th,
.profile-side .table-sidebar td { padding: 10px 10px; }

.table-users .profile-photo { font-size: 13px; }
.profile-hero .profile-photo { font-size: 28px; }
.profile-thumb .profile-photo { font-size: 18px; }

/* avatar: user-panel model */
.users-list .profile-photo,
.diaries-user-card .profile-photo,
.diaries-person .profile-photo,
.table .profile-photo,
.table-users .profile-photo,
.profile-hero .profile-photo,
.profile-thumb .profile-photo,
.profile-photo-big,
.profile-page .profile-photo {
  border-radius: 50%;
  background: var(--shift-5);
  color: #fff;
  font-weight: 600;
  border: 0;
  box-shadow: none;
}

.diaries-user-card { display: inline-flex; }
.diaries-user-card .profile-photo {
  width: 64px;
  height: 64px;
  font-size: 18px;
  line-height: 1;
}
.diaries-user-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* diaries toolbar */
.diaries-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  width: calc(100% - 24px);
  margin: 2px 0 18px 24px;
}
.diaries-toolbar-select { flex: 1 1 auto; min-width: 240px; }
.diaries-toolbar-select .select2-container { width: 100% !important; }
.diaries-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.diaries-person {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  color: inherit;
  text-decoration: none;
}
.diaries-toolbar > .diaries-person { flex: 0 1 300px; }
.diaries-person:hover,
.diaries-person:focus { color: inherit; text-decoration: none; }
.diaries-person-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}
.diaries-person-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.diaries-person-meta,
.diaries-person-teams {
  color: var(--color-text-faint);
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.diaries-person .profile-photo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-align: center;
  padding: 0;
}
.diaries-toolbar .diaries-person .profile-photo {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  font-size: 14px;
}
.table-diaries .diaries-user-cell {
  width: 280px;
  min-width: 280px;
  vertical-align: middle;
}
.table-diaries tbody td { vertical-align: middle; }
.table-diaries .diaries-person .profile-photo {
  width: 40px;
  height: 40px;
  max-width: 40px;
  flex: 0 0 40px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}


.select2-container--default .select2-selection--single {
  height: 44px !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 10px !important;
  background: var(--color-surface) !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 42px !important;
  padding-left: 14px !important;
  padding-right: 40px !important;
  color: var(--color-text) !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 42px;
  width: 36px;
  top: 1px;
  right: 6px;
}
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--single {
  border-color: var(--color-primary);
}
/* Select multiple (equipos, usuarios, categorias): Select2 no lo trae tematizado
   y caia en blanco fijo. Se replica el patron del --single. */
.select2-container--default .select2-selection--multiple {
  /* Altura exacta igual que el select simple: con min-height el contenido
     empujaba a 45px y descuadraba la fila de Proyecto/Tarea/Materiales. */
  height: 44px !important;
  min-height: 44px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 10px !important;
  background: var(--color-surface) !important;
  color: var(--color-text) !important;
}
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--multiple {
  border-color: var(--color-primary) !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
  /* Misma tipografia y padding que el select simple: antes usaba 4px 8px
     y el texto de Materiales no coincidia con Proyecto/Tarea. */
  padding: 0 14px !important;
  line-height: 42px !important;
  font-size: inherit !important;
  color: var(--color-text) !important;
}

/* El buscador interno hereda la tipografia del select simple. */
.select2-container--default .select2-selection--multiple .select2-search__field {
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: 42px !important;
  margin: 0 !important;
}
.select2-container--default .select2-selection--multiple .select2-search__field {
  background: transparent !important;
  border: 0 !important;
  color: var(--color-text) !important;
  box-shadow: none !important;
}
.select2-container--default .select2-selection--multiple .select2-search__field::placeholder {
  color: var(--color-text-muted) !important;
  opacity: 1;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
  margin: 3px 5px 3px 0 !important;
  padding: 2px 8px !important;
  border: 1px solid var(--color-border-strong) !important;
  border-radius: 999px !important;
  background: var(--color-surface-sunken) !important;
  color: var(--color-text) !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  margin-right: 5px !important;
  color: var(--color-text-muted) !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
  color: var(--color-danger-strong) !important;
  background: transparent !important;
}
/* El desplegable necesita separarse del fondo: sin elevacion se funde con
   la superficie (surface #141c2b vs sunken #121826). */
.select2-container--default .select2-dropdown {
  border: 1px solid var(--color-border-strong) !important;
  box-shadow: var(--shadow-md, 0 14px 34px rgba(0, 0, 0, 0.28)) !important;
  z-index: 1051;
}

/* Estado resaltado del desplegable.
   No se usa --color-primary como fondo: en Shifts y Clasico el par
   primary/on-accent da 2.5:1 y en las otras el token invierte. Se resuelve
   con superficie + texto (que siempre contrastan por definicion) y una
   barra de acento a la izquierda como senal de seleccion. */
.select2-container--default .select2-results__option--highlighted,
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted[aria-selected="true"],
.select2-container--default .select2-results__option:hover {
  background: var(--color-surface-sunken) !important;
  color: var(--color-text) !important;
  box-shadow: inset 3px 0 0 var(--color-primary);
}

.select2-dropdown {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  color: var(--color-text);
}
.select2-container--default .select2-search--dropdown .select2-search__field {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
}
.select2-container--default .select2-results__option { color: var(--color-text); }
/* Opcion ya seleccionada pero NO resaltada: Select2 le pone #ddd fijo,
   que con texto claro queda ilegible en tema oscuro. */
.select2-container--default .select2-results__option[aria-selected="true"] {
  background: var(--color-surface-sunken) !important;
  color: var(--color-text) !important;
}
.select2-container--default .select2-results__option[aria-selected="true"]:hover,
/* Hover sobre opcion no seleccionada */
.select2-container--default .select2-results__option:hover {
  background: var(--color-surface-sunken) !important;
  color: var(--color-text) !important;
}
.select2-container--default .select2-results__group { color: var(--color-text-faint); }


/* diaries day nav */
.diaries-day-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: calc(100% - 24px);
  margin: 0 0 18px 24px;
}
.diaries-day-nav .input-group { flex: 0 0 240px; width: 240px; }
.diaries-day-nav-end { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* team holiday requests */
.table-team-requests th,
.table-team-requests td {
  vertical-align: middle;
  text-align: left;
}
.table-team-requests .diaries-user-cell { width: 320px; min-width: 260px; }
.table-team-requests .diaries-person .profile-photo {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.table-team-requests .request-line { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.table-team-requests .request-line a { color: inherit; text-decoration: none; }
.table-team-requests .request-meta {
  color: var(--color-text-faint);
  font-size: 12px;
  font-style: normal;
  display: flex;
  align-items: center;
  gap: 8px;
}
.table-team-requests .row-actions { width: 96px; text-align: right; white-space: nowrap; }
.table-team-requests .row-actions .btn-icon { display: inline-flex; vertical-align: middle; }

/* occupation grid */
.occupation-nav { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
.occupation-nav .btn { margin: 0; }
.occupation-month { margin: 0; font-size: 18px; font-weight: 600; }
.occupation-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}
.occupation-week-nav { display: flex; align-items: center; gap: 8px; }
.occupation-week-label { min-width: 7em; text-align: center; font-size: 14px; }
.occupation-week-nav .icon { width: 18px; height: 18px; }
.occupation-grid { width: 100%; margin: 0; }
.occupation-grid th,
.occupation-grid td {
  vertical-align: middle;
  text-align: center;
  padding: 8px 4px;
}
.occupation-grid thead th:first-child,
.occupation-grid tbody th { text-align: left; }
.occupation-panel[data-occupation-panel="week"] .occupation-grid { table-layout: fixed; }
.occupation-panel[data-occupation-panel="week"] .occupation-grid thead th:first-child,
.occupation-panel[data-occupation-panel="week"] .occupation-grid tbody th { width: 230px; }
.occupation-person {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--color-text);
  text-decoration: none;
}
.occupation-person:hover { color: var(--color-primary); text-decoration: none; }
.occupation-grid .occupation-person .profile-photo {
  width: 28px;
  height: 28px;
  max-width: 28px;
  flex: 0 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 10px;
  line-height: 1;
  text-align: center;
}
.occupation-person-text { min-width: 0; }
.occupation-person-name,
.occupation-person-team {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.occupation-person-name { font-size: 13px; font-weight: 600; line-height: 1.3; }
.occupation-person-team { margin-top: 1px; font-size: 12px; font-weight: 500; line-height: 1.3; color: var(--color-text-muted); }
.occupation-dow { display: block; font-size: 11px; font-weight: 600; color: var(--color-text-muted); }
.occupation-dom { display: block; font-size: 13px; font-weight: 600; }
.occupation-grid .is-outside { color: var(--color-text-muted); }
.occupation-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--mark, var(--color-primary)) 16%, var(--color-surface));
  color: var(--mark, var(--color-primary));
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}
.occupation-mark.is-free {
  background: transparent;
  color: var(--color-text-muted);
  font-weight: 500;
}
.occupation-mark.is-festive { --mark: var(--shift-festive); }
.occupation-mark.is-holiday { --mark: var(--color-success); }
.occupation-mark.is-leave { --mark: var(--color-warning, #b86e00); }
.occupation-totals th,
.occupation-totals td { font-size: 12px; font-weight: 600; color: var(--color-text-muted); }
.occupation-totals .is-low { color: var(--color-danger); }
.occupation-scroll { overflow-x: auto; }
.occupation-month-table {
  width: 100%;
  min-width: 100%;
  table-layout: fixed;
}
.occupation-month-table thead th:first-child,
.occupation-month-table tbody th {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--color-surface);
  width: 230px;
  max-width: 230px;
  min-width: 230px;
  overflow: hidden;
  box-shadow: 1px 0 0 var(--color-border);
}
.occupation-panel[data-occupation-panel="month"] .occupation-mark {
  min-width: 22px;
  height: 20px;
  padding: 0 4px;
  font-size: 11px;
}

.occupation-week-nav[hidden] { display: none; }

.fc-event-chip.is-more { background: transparent; color: var(--color-text-muted); padding-left: 2px; font-weight: 500; }

/* admin catalog header */
.content-header:has(> a.btn) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 16px;
}
.content-header:has(> a.btn) .breadcrumb,
.content-header:has(> a.btn) .content-description { grid-column: 1 / -1; }
.content-header:has(> a.btn) > h1 { grid-column: 1; grid-row: 2; margin: 0; }
.content-header:has(> a.btn) > a.btn { grid-column: 2; grid-row: 2; margin: 0; }
.dataTables_wrapper .dt-buttons { display: inline-flex; }
.dataTables_wrapper .dataTables_filter { margin: 0 0 12px; }
.dataTables_wrapper .dataTables_filter input {
  min-height: 40px;
  margin-left: 8px;
  border: 1px solid var(--color-border-strong);
  border-radius: 10px;
  padding: 6px 12px;
}
/* admin catalog polish */
.row > form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  flex: 1 1 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
}
.row > form > [class*="col-"] {
  padding: 0 12px;
  flex: 0 0 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
}
@media (min-width: 768px) {
  .row > form > .col-sm-2 { flex-basis: 16.666%; max-width: 16.666%; }
  .row > form > .col-sm-3 { flex-basis: 25%; max-width: 25%; }
  .row > form > .col-sm-4 { flex-basis: 33.333%; max-width: 33.333%; }
  .row > form > .col-sm-6 { flex-basis: 50%; max-width: 50%; }
  .row > form > .col-sm-12 { flex-basis: 100%; max-width: 100%; }
}
.form-group .select2-container { width: 100% !important; max-width: 100%; }
.select2-container--default .select2-selection--single .select2-selection__arrow b {
  border: 0 !important;
  width: 16px !important;
  height: 16px !important;
  margin-left: -8px !important;
  margin-top: -8px !important;
  left: 50% !important;
  top: 50% !important;
  position: absolute !important;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c6e82' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / 16px 16px no-repeat !important;
}
html[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__arrow b {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d5e2ee' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
}
.form-header-search h3 {
  margin: 4px 0 8px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-text);
}
.form-header-search > .col-sm-12:not(.text-right) {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}
.form-header-search .text-right {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}
.form-header-search .text-right .btn { margin: 0; }

.dataTables_wrapper .dataTables_filter label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-text-muted);
}
.dataTables_wrapper .dataTables_info {
  padding-top: 14px;
  color: var(--color-text-muted);
  font-size: 13px;
}
.dataTables_wrapper .pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.dataTables_wrapper .pagination > li {
  display: inline-flex;
  list-style: none;
  float: none;
}
.dataTables_wrapper .pagination > li::marker { content: none; }
.dataTables_wrapper .pagination > li > a,
.dataTables_wrapper .pagination > li > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--color-border-strong);
  border-radius: 10px;
  background: var(--color-surface);
  color: var(--color-text);
  text-decoration: none;
  float: none;
}
.dataTables_wrapper .pagination > li > a:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.dataTables_wrapper .pagination > .active > a,
.dataTables_wrapper .pagination > .active > a:hover,
.dataTables_wrapper .pagination > .active > a:focus {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.dataTables_wrapper .pagination > .disabled > a,
.dataTables_wrapper .pagination > .disabled > a:hover {
  opacity: 0.4;
  pointer-events: none;
  color: var(--color-text-muted);
  background: var(--color-surface);
}

table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc,
table.dataTable thead th.sorting_asc_disabled,
table.dataTable thead th.sorting_desc_disabled {
  background-image: none !important;
  position: relative;
  padding-right: 28px;
}
table.dataTable thead th.sorting::after,
table.dataTable thead th.sorting_asc::after,
table.dataTable thead th.sorting_desc::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  background: currentColor;
  opacity: 0.35;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 9 5-5 5 5M7 15l5 5 5-5'/%3E%3C/svg%3E") center / 14px 14px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 9 5-5 5 5M7 15l5 5 5-5'/%3E%3C/svg%3E") center / 14px 14px no-repeat;
}
table.dataTable thead th.sorting_asc::after {
  opacity: 0.9;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 14 6-6 6 6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 14 6-6 6 6'/%3E%3C/svg%3E");
}
table.dataTable thead th.sorting_desc::after {
  opacity: 0.9;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 10 6 6 6-6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 10 6 6 6-6'/%3E%3C/svg%3E");
}

table.dataTable td i.fa-check,
table.dataTable td i.fa-times,
table.dataTable td i.fa-remove {
  display: inline-block;
  width: 18px;
  height: 18px;
  font-size: 0;
  line-height: 0;
  vertical-align: -3px;
  background: currentColor;
  -webkit-mask: var(--bool) center / 16px 16px no-repeat;
  mask: var(--bool) center / 16px 16px no-repeat;
}
table.dataTable td i.fa-check {
  color: var(--color-success-strong);
  --bool: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E");
}
table.dataTable td i.fa-times,
table.dataTable td i.fa-remove {
  color: var(--color-danger);
  --bool: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E");
}

table.dataTable td [class*="color-radio-"] {
  display: inline-block;
  width: 72px;
  vertical-align: middle;
}
table.dataTable td [class*="color-radio-"] > .iradio_line {
  width: 72px !important;
  height: 14px !important;
  min-height: 14px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow: none !important;
}
.color-radio-1 > .iradio_line { background: var(--shift-1) !important; }
.color-radio-2 > .iradio_line { background: var(--shift-2) !important; }
.color-radio-3 > .iradio_line { background: var(--shift-3) !important; }
.color-radio-4 > .iradio_line { background: var(--shift-4) !important; }
.color-radio-5 > .iradio_line { background: var(--shift-5) !important; }
.color-radio-7 > .iradio_line { background: var(--shift-7) !important; }
.color-radio-9 > .iradio_line { background: var(--shift-9) !important; }
.color-radio-11 > .iradio_line { background: var(--shift-11) !important; }
.color-radio-12 > .iradio_line { background: var(--shift-12) !important; }
.form-group .color-radio { margin-bottom: 8px; padding-left: 0; padding-right: 8px; }
.form-group .color-radio > .iradio_line {
  height: 28px !important;
  min-height: 28px !important;
  border: 0 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}
.iradio_line.checked {
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.9) !important;
}

.form-horizontal .form-group {
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
  gap: 8px 16px;
  align-items: center;
  margin-left: 0;
  margin-right: 0;
}
.form-horizontal .control-label {
  margin: 0;
  text-align: left;
}
.form-horizontal .form-group > [class*="col-"] {
  width: auto;
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}
@media (max-width: 767px) {
  .form-horizontal .form-group { grid-template-columns: 1fr; }
}

/* admin catalog polish 2 */
.row > form .form-group label { white-space: normal; overflow-wrap: anywhere; max-width: 100%; }
.dataTables_wrapper { max-width: 100%; overflow-x: auto; }
.form-horizontal input[type=file] { min-height: 44px; padding: 8px 12px; }

.color-radio-6 > .iradio_line { background: #CFF800 !important; }
.color-radio-8 > .iradio_line { background: #FC6238 !important; }
.color-radio-10 > .iradio_line { background: #00B0BA !important; }

/* admin bool align */
table.dataTable td i.fa-check::before,
table.dataTable td i.fa-times::before,
table.dataTable td i.fa-remove::before { content: none !important; }
table.dataTable td:has(> i.fa-check),
table.dataTable td:has(> i.fa-times),
table.dataTable td:has(> i.fa-remove),
table.dataTable td:has(> span > i.fa-check),
table.dataTable td:has(> span > i.fa-times),
table.dataTable td:has(> span > i.fa-remove) { white-space: nowrap; }
table.dataTable td i.fa-check,
table.dataTable td i.fa-times,
table.dataTable td i.fa-remove { vertical-align: middle; margin: 0 6px 0 0; }
table.dataTable td .boolean-excel { display: inline; vertical-align: middle; }

/* admin table cell align */
table.dataTable thead th,
table.dataTable tbody td { vertical-align: middle; }
table.dataTable tbody td { padding-top: 6px; padding-bottom: 6px; }

/* admin header actions */
.content-header:has(> .header-actions) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 16px;
}
.content-header:has(> .header-actions) .breadcrumb,
.content-header:has(> .header-actions) .content-description { grid-column: 1 / -1; }
.content-header:has(> .header-actions) > h1 { grid-column: 1; grid-row: 2; margin: 0; }
.content-header:has(> .header-actions) > .header-actions {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
}
.header-actions .btn { margin: 0; }

/* admin table toolbar */
.dataTables_wrapper .dt-buttons.btn-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  float: left;
  margin: 0 0 12px;
  vertical-align: middle;
}
.dataTables_wrapper .dt-buttons.btn-group > .btn,
.dataTables_wrapper .dt-buttons.btn-group > .btn:first-child,
.dataTables_wrapper .dt-buttons.btn-group > .btn:last-child,
.dataTables_wrapper .dt-buttons.btn-group > .btn:not(:first-child):not(:last-child) {
  float: none;
  margin: 0;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px !important;
}
.dataTables_wrapper .dataTables_filter {
  float: right;
  margin: 0 0 12px;
}
.dataTables_wrapper .dataTables_filter label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 600;
  color: var(--color-text);
}
.dataTables_wrapper .dataTables_filter input { margin-left: 0; }
.dataTables_wrapper table.dataTable { clear: both; }
.dataTables_wrapper .dt-buttons .fa {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin: 0 8px 0 0;
  vertical-align: -3px;
  background: currentColor;
  -webkit-mask: var(--tb-icon) center / 16px 16px no-repeat;
  mask: var(--tb-icon) center / 16px 16px no-repeat;
}
.dataTables_wrapper .dt-buttons .fa::before { content: none !important; }
.dataTables_wrapper .dt-buttons .fa-plus { --tb-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M12%205v14M5%2012h14%27/%3E%3C/svg%3E"); }
.dataTables_wrapper .dt-buttons .fa-download { --tb-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M12%204v11M8%2011l4%204%204-4M5%2020h14%27/%3E%3C/svg%3E"); }
.dataTables_wrapper .dt-buttons .fa-print { --tb-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M6%209V4h12v5%27/%3E%3Cpath%20d%3D%27M6%2018H4a2%202%200%200%201-2-2v-5a2%202%200%200%201%202-2h16a2%202%200%200%201%202%202v5a2%202%200%200%201-2%202h-2%27/%3E%3Cpath%20d%3D%27M6%2014h12v6H6z%27/%3E%3C/svg%3E"); }
.dataTables_wrapper .dt-buttons .fa-undo { --tb-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M3%208v5h5%27/%3E%3Cpath%20d%3D%27M4%2013a8%208%200%201%200%202.2-6.5%27/%3E%3C/svg%3E"); }
.dataTables_wrapper .dt-buttons .fa-refresh { --tb-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M21%2012a9%209%200%200%200-15.5-6.2L3%208%27/%3E%3Cpath%20d%3D%27M3%203v5h5%27/%3E%3Cpath%20d%3D%27M3%2012a9%209%200%200%200%2015.5%206.2L21%2016%27/%3E%3Cpath%20d%3D%27M21%2021v-5h-5%27/%3E%3C/svg%3E"); }
.dataTables_wrapper .dt-buttons .caret {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin: 0 0 0 6px;
  vertical-align: -2px;
  border: 0;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M6%209l6%206%206-6%27/%3E%3C/svg%3E") center / 14px 14px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M6%209l6%206%206-6%27/%3E%3C/svg%3E") center / 14px 14px no-repeat;
}
div.dt-button-collection {
  z-index: 40;
  min-width: 180px;
  padding: 6px;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
}
div.dt-button-collection > .dt-button,
div.dt-button-collection .dropdown-menu > li > a {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text);
  text-align: left;
  text-decoration: none;
  box-shadow: none;
}
div.dt-button-collection > .dt-button:hover,
div.dt-button-collection .dropdown-menu > li > a:hover {
  background: color-mix(in srgb, var(--color-text) 8%, transparent);
  color: var(--color-text);
}

/* admin export menu */
ul.dt-button-collection.dropdown-menu {
  right: auto;
  left: auto;
  width: max-content;
  min-width: 180px;
}
ul.dt-button-collection.dropdown-menu > li {
  margin: 0;
  padding: 0;
}
ul.dt-button-collection .dt-button > a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--color-text);
  white-space: nowrap;
  text-decoration: none;
}
ul.dt-button-collection .dt-button > a:hover {
  background: color-mix(in srgb, var(--color-text) 8%, transparent);
  color: var(--color-text);
  text-decoration: none;
}
ul.dt-button-collection .fa {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin: 0;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M14%203H7a2%202%200%200%200-2%202v14a2%202%200%200%200%202%202h10a2%202%200%200%200%202-2V8z%27/%3E%3Cpath%20d%3D%27M14%203v5h5M8%2013h8M8%2017h5%27/%3E%3C/svg%3E") center / 16px 16px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M14%203H7a2%202%200%200%200-2%202v14a2%202%200%200%200%202%202h10a2%202%200%200%200%202-2V8z%27/%3E%3Cpath%20d%3D%27M14%203v5h5M8%2013h8M8%2017h5%27/%3E%3C/svg%3E") center / 16px 16px no-repeat;
}
ul.dt-button-collection .fa::before { content: none !important; }

/* admin export icons */
ul.dt-button-collection .buttons-csv .fa {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M14%203H7a2%202%200%200%200-2%202v14a2%202%200%200%200%202%202h10a2%202%200%200%200%202-2V8z%27/%3E%3Cpath%20d%3D%27M14%203v5h5M8%2013h8M8%2017h5%27/%3E%3C/svg%3E") !important;
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M14%203H7a2%202%200%200%200-2%202v14a2%202%200%200%200%202%202h10a2%202%200%200%200%202-2V8z%27/%3E%3Cpath%20d%3D%27M14%203v5h5M8%2013h8M8%2017h5%27/%3E%3C/svg%3E") !important;
}
ul.dt-button-collection .buttons-excel .fa {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%271.7%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M14%203H7a2%202%200%200%200-2%202v14a2%202%200%200%200%202%202h10a2%202%200%200%200%202-2V8z%27/%3E%3Cpath%20d%3D%27M14%203v5h5%27/%3E%3Cpath%20d%3D%27M9.8%2013.2l4.4%204.4M14.2%2013.2l-4.4%204.4%27/%3E%3C/svg%3E") !important;
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%271.7%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M14%203H7a2%202%200%200%200-2%202v14a2%202%200%200%200%202%202h10a2%202%200%200%200%202-2V8z%27/%3E%3Cpath%20d%3D%27M14%203v5h5%27/%3E%3Cpath%20d%3D%27M9.8%2013.2l4.4%204.4M14.2%2013.2l-4.4%204.4%27/%3E%3C/svg%3E") !important;
}
ul.dt-button-collection .buttons-pdf .fa {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M14%203H7a2%202%200%200%200-2%202v14a2%202%200%200%200%202%202h10a2%202%200%200%200%202-2V8z%27/%3E%3Cpath%20d%3D%27M14%203v5h5%27/%3E%3Cpath%20d%3D%27M8.6%2017.4v-3.6h1.5a1.1%201.1%200%200%201%200%202.2H8.6%27/%3E%3Cpath%20d%3D%27M12.8%2017.4v-3.6h1.2a1.8%201.8%200%200%201%200%203.6z%27/%3E%3Cpath%20d%3D%27M17%2013.8h-1.6v3.6%27/%3E%3C/svg%3E") !important;
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M14%203H7a2%202%200%200%200-2%202v14a2%202%200%200%200%202%202h10a2%202%200%200%200%202-2V8z%27/%3E%3Cpath%20d%3D%27M14%203v5h5%27/%3E%3Cpath%20d%3D%27M8.6%2017.4v-3.6h1.5a1.1%201.1%200%200%201%200%202.2H8.6%27/%3E%3Cpath%20d%3D%27M12.8%2017.4v-3.6h1.2a1.8%201.8%200%200%201%200%203.6z%27/%3E%3Cpath%20d%3D%27M17%2013.8h-1.6v3.6%27/%3E%3C/svg%3E") !important;
}
ul.dt-button-collection .fa {
  width: 18px;
  height: 18px;
  -webkit-mask-size: 18px 18px !important;
  mask-size: 18px 18px !important;
  -webkit-mask-position: center !important;
  mask-position: center !important;
  -webkit-mask-repeat: no-repeat !important;
  mask-repeat: no-repeat !important;
}

/* toolbar excel icon */
.dataTables_wrapper .dt-buttons .fa-file-excel-o,
.dataTables_wrapper .dt-buttons .fa-file-excel,
.dataTables_wrapper .dt-buttons .buttons-excel .fa {
  --tb-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%271.7%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M14%203H7a2%202%200%200%200-2%202v14a2%202%200%200%200%202%202h10a2%202%200%200%200%202-2V8z%27/%3E%3Cpath%20d%3D%27M14%203v5h5%27/%3E%3Cpath%20d%3D%27M9.8%2013.2l4.4%204.4M14.2%2013.2l-4.4%204.4%27/%3E%3C/svg%3E");
}

/* admin shift colour indicators */
.form-group .color-radio,
.form-group .color-radio[class*="color-radio-"] {
  background: transparent !important;
  background-color: transparent !important;
  border-radius: 0;
  padding: 0 10px 0 0;
  margin-bottom: 10px;
  box-sizing: border-box;
}
.form-group .color-radio > .iradio_line {
  position: relative;
  width: 100% !important;
  height: 32px !important;
  min-height: 32px !important;
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  overflow: hidden;
  cursor: pointer;
}
.form-group .color-radio > .iradio_line > .icheck_line-icon {
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
}
.form-group .color-radio > .iradio_line .icheck_line-icon {
  left: 8px !important;
  margin-top: 0 !important;
  top: 50% !important;
  transform: translateY(-50%);
}
.form-group .color-radio .iradio_line.checked,
.form-group .color-radio > .iradio_line.checked {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .92) !important;
}

table.dataTable td [class*="color-radio-"]:has(> .iradio_line) {
  background: transparent !important;
  border-radius: 0 !important;
}

/* admin shift colour grid */
.row:has(> .color-radio) {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 10px;
  margin: 0;
  width: 100%;
}
.row:has(> .color-radio) > .color-radio {
  float: none;
  width: auto;
  max-width: none;
  min-width: 0;
  flex: none;
  padding: 0;
  margin: 0;
}
.row:has(> .color-radio) > .color-radio > .iradio_line {
  width: 100% !important;
}
@media (max-width: 767px) {
  .row:has(> .color-radio) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.row:has(> .color-radio) + .row:has(> .color-radio) {
  margin-top: 10px;
}
.row:has(> .color-radio) > .color-radio > .iradio_line {
  margin: 0 !important;
}


/* home alert cards */
.box .box-body > .festive-list:only-child { padding-bottom: 4px; }
.box .festive-list .status-pill { flex: 0 0 auto; align-self: flex-start; margin-top: 2px; }
.box .festive-list .event-body a { color: var(--color-text); text-decoration: none; }
.box .festive-list .event-body a:hover { color: var(--color-primary-hover); text-decoration: underline; }
.box .festive-list .event-meta { overflow-wrap: anywhere; }
.box .box-header .box-title .presence-count { vertical-align: middle; }

/* home alert avatars */
.box .festive-list > li > .profile-photo {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  background: var(--shift-5);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  border: 0;
  box-shadow: none;
  margin-top: 2px;
}
html[data-theme="dark"] .box .festive-list > li > .profile-photo {
  background: var(--shift-5);
  color: #fff;
}

/* modal abierto: jQuery escribe display:block en linea, hay que ganarle */
.modal.in,
.modal.show {
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}
.modal.in > .modal-dialog {
  margin: auto;
}
.modal-backdrop {
  z-index: 1040;
}

/* refuerzo: el loadingModal antiguo trae padding-top en linea */
.modal[style*="padding-top"] {
  padding-top: 16px !important;
}

/* el loading modal no debe animarse: solo informa de que algo carga */
.modal.fade .modal-dialog.modal-m .modal-content,
.modal.fade .modal-dialog.modal-sm .modal-content {
  animation: none !important;
}
.modal.fade {
  transition: opacity 120ms linear;
}
/* barra de progreso del loader, con la tinta del tema */
.modal .modal-content .progress {
  height: 4px;
  border-radius: 999px;
  background: var(--color-surface-sunken);
  overflow: hidden;
}
.modal .modal-content .progress-bar {
  background: var(--color-primary);
  box-shadow: 0 0 12px color-mix(in srgb, var(--color-primary) 55%, transparent);
}

/* sweetalert con la piel del tema */
.sweet-overlay {
  background: color-mix(in srgb, var(--color-text) 55%, transparent) !important;
}
.sweet-alert {
  background: var(--color-surface) !important;
  color: var(--color-text) !important;
  border: var(--card-border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-lg) !important;
  padding: 32px 28px 24px !important;
  margin-left: -256px;
}
.sweet-alert h2 {
  font-family: var(--font) !important;
  font-size: 19px !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  color: var(--color-text) !important;
  margin: 0 0 8px !important;
}
.sweet-alert p {
  font-size: 14px !important;
  color: var(--color-text-muted) !important;
  margin: 0 0 20px !important;
}
.sweet-alert .sa-icon { margin: 0 auto 20px; }
.sweet-alert .sa-icon.sa-warning { border-color: var(--color-warning-strong); }
.sweet-alert .sa-icon.sa-warning .sa-body,
.sweet-alert .sa-icon.sa-warning .sa-dot { background-color: var(--color-warning-strong); }
.sweet-alert .sa-icon.sa-error { border-color: var(--color-danger); }
.sweet-alert .sa-icon.sa-error .sa-line { background-color: var(--color-danger); }
.sweet-alert .sa-icon.sa-success { border-color: var(--color-success); }
.sweet-alert .sa-icon.sa-success .sa-line { background-color: var(--color-success); }
.sweet-alert .sa-icon.sa-info { border-color: var(--color-primary); }
.sweet-alert .sa-icon.sa-info::before { background-color: var(--color-primary); }
.sweet-alert button {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  min-height: 44px;
  padding: 9px 22px;
  border: 0;
  border-radius: 999px !important;
  cursor: pointer;
  box-shadow: none !important;
  transition: background 150ms var(--ease), color 150ms var(--ease);
}
.sweet-alert button.confirm {
  background: var(--color-primary) !important;
  color: var(--color-on-accent) !important;
}
.sweet-alert button.confirm:hover,
.sweet-alert button.confirm:focus {
  background: var(--color-primary-hover) !important;
  color: var(--color-on-accent) !important;
}
.sweet-alert button.cancel {
  background: var(--color-surface-sunken) !important;
  color: var(--color-text) !important;
}
.sweet-alert button.cancel:hover,
.sweet-alert button.cancel:focus {
  background: var(--color-border) !important;
  color: var(--color-text) !important;
}
.sweet-alert .sa-input-error { border-color: var(--color-danger); }

/* boton borrar fichaje dentro de la fila */
.diary-entry-group .row.form-group > .delete-cell {
  display: flex;
  align-self: stretch;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0;
}
.diary-entry-group .delete-btn {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--color-danger-soft);
  color: var(--color-danger);
  text-decoration: none;
  cursor: pointer;
  transition: background 150ms var(--ease), color 150ms var(--ease);
  box-shadow: none;
  transform: none;
}
.diary-entry-group .delete-btn:hover,
.diary-entry-group .delete-btn:focus {
  background: var(--color-danger);
  color: #fff;
  transform: none;
}
.diary-entry-group .delete-btn .icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

/* edit diary modal (themed) */
#editDiariesContainer { counter-reset: diary-counter; }
.diary-entry-group {
  background: var(--color-surface-sunken);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 22px;
  padding: 16px 14px 14px;
  position: relative;
}
.diary-entry-group:last-child { margin-bottom: 0; }
.diary-entry-group .row.form-group { margin-bottom: 8px !important; }
.diary-entry-group .row.form-group:last-child { margin-bottom: 0 !important; }
.diary-entry-group .facturado-wrapper {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Todas las filas de la franja comparten el mismo padding lateral, asi el
   contenido arranca en la misma vertical en las tres. */
#editDiariesModal #editDiariesContainer .row.form-group[id^="line-"],
#editDiariesModal #editDiariesContainer .row.form-group[id^="obs-line-"],
#editDiariesModal #editDiariesContainer .row.form-group[id^="other-costs-line-"] {
  padding-left: 12px !important;
  padding-right: 12px !important;
}

/* Observaciones, Costes y Materiales llevan 10px de padding propio; el
   campo de hora arranca en el borde del addon. Se compensa el desfase
   para que los tres bordes izquierdos coincidan exactamente. */
#editDiariesModal .diary-entry-group .obs-input,
#editDiariesModal .other-cost-row-modal .other-cost-input,
#editDiariesModal .other-cost-row-modal .other-cost-description {
  margin-left: -10px;
}

/* La fila de costes recupera ese margen por la derecha. */
#editDiariesModal .other-cost-row-modal {
  padding-right: 10px;
}

.diary-entry-group .field-label {
  display: block;
  margin-bottom: 3px;
  color: var(--color-text-muted);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.materials-quantity-row {
  display: flex;
  align-items: center;
  width: 30%;
  margin: 0 20px 8px 0;
  padding: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}
.materials-quantity-label { flex: 1; margin: 0; color: var(--color-text); font-size: 11px; }
.materials-quantity-input { width: 80px; margin-left: 10px; font-size: 12px; text-align: center; }
#materials-quantities-container,
[id^="materials-quantities-container-"] { display: flex; justify-content: flex-start; flex-wrap: wrap; }
@media (max-width: 991px) and (min-width: 768px) { .materials-quantity-row { width: 48%; } }
@media (max-width: 767px) {
  .materials-quantity-row { width: 100%; margin-right: 0; }
  .diary-entry-group .delete-cell { justify-content: flex-start; margin-top: 4px; }
}

/* el boton de borrar se pega al borde derecho del bloque */
.diary-entry-group .row.form-group > .delete-cell {
  padding-right: 0 !important;
}
.diary-entry-group .row.form-group > .delete-cell .delete-btn {
  margin-right: 0;
}
.diary-entry-group > .row.form-group { margin-right: 0 !important; }
.diary-entry-group .delete-cell { padding-right: 0 !important; }
.diary-entry-group {
  background: color-mix(in srgb, var(--color-surface-sunken) 45%, var(--color-surface));
  border-color: color-mix(in srgb, var(--color-border) 70%, transparent);
}

/** A4: botones de Asignacion de Vacaciones bajo el titulo, a la izquierda.
    .header-actions salta a la columna 2 por defecto; aqui ocupa fila propia. */
.content-header--actions-left:has(> .header-actions) > .header-actions {
  grid-column: 1 / -1;
  grid-row: 3;
  justify-content: flex-start;
}

/** A5: el boton Guardar del bloque Documentos estaba oculto tras :has(.document-box). */
#saveDocumentsForm > input[type=submit] {
  display: inline-flex;
  align-self: flex-start;
  margin: 4px 0 0;
  float: none;
}

/** Flecha del select nativo.
    El shorthand `background` del bloque .form-control reseteaba
    background-repeat y repetia la flecha a lo ancho; alli ya se usa
    background-color. Aqui se declara la flecha una sola vez. */
select.form-control,
.input-group select.form-control {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c6e82' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
}
html[data-theme="dark"] select.form-control,
html[data-theme="dark"] .input-group select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d5e2ee' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}


/* Aceptar directamente en la misma linea que Solicitar */
#newHolidayRequestForm .request-actions { flex-wrap: wrap !important; align-items: center !important; gap: 10px; }
#newHolidayRequestForm .request-actions > .btn { flex: 0 0 auto !important; }
#newHolidayRequestForm .request-actions > .btn-primary {
  flex: 1 1 auto !important;
  min-width: max-content !important;
  white-space: nowrap;
}
#newHolidayRequestForm .request-actions > .request-accept { flex: 0 0 auto !important; display: inline-flex !important; align-items: center !important; gap: 6px !important; margin: 0 !important; width: auto !important; }
#newHolidayRequestForm .request-actions > .request-accept label { margin: 0 !important; padding: 0 !important; font-size: 11.5px !important; white-space: nowrap; text-transform: none; letter-spacing: 0; }

/* Avatares recortados sin deformar */
img.user-image, img.profile-photo, img.profile-photo-big { object-fit: cover; }
img.avatar { object-fit: cover; }

@media (max-width: 767px) {
  .clock-readout {
    flex-wrap: wrap;
    gap: 10px;
  }
  .clock-readout .day-ring {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
  }
  .clock-readout .duration-display {
    min-width: 0;
    flex: 1 1 auto;
  }
  .clock-readout > .btn {
    flex: 0 0 auto;
    margin-left: auto;
  }
}

/* El menu de diseno se anclaba con right:0 a un li de 36px en movil y sus
   250px se salian 26px por la izquierda. En pantallas estrechas se ancla al
   header completo para que quepa siempre dentro del viewport. */
@media (max-width: 767px) {
  .design-menu-wrapper { position: static; }
  .design-menu-wrapper .design-menu {
    left: 12px;
    right: 12px;
    min-width: 0;
    width: auto;
  }
}

/* Fichajes en movil: la toolbar pedia 240px minimos de select y otros 122 de
   acciones con nowrap, asi que no cabia y el boton Exportar se salia. Se apila
   en vertical y cada control ocupa todo el ancho. La tabla ya tiene su propio
   scroll horizontal en .table-responsive, asi que aqui solo se aprieta el aire. */
@media (max-width: 767px) {
  .diaries-toolbar {
    flex-wrap: wrap;
    width: 100%;
    margin: 0 0 16px;
    gap: 12px;
  }
  .diaries-toolbar > .diaries-person,
  .diaries-toolbar-select,
  .diaries-toolbar-actions {
    flex: 1 1 100%;
    min-width: 0;
    max-width: 100%;
  }
  .diaries-toolbar-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
  .diaries-toolbar-actions > .btn {
    flex: 1 1 auto;
    min-width: 0;
  }
  .diaries-toolbar .diaries-person-text {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

/* ============================================================
   Componentes Bootstrap sin re-tematizar
   ------------------------------------------------------------
   El modulo de Proyectos y Materiales usa .card, .card-header y
   .card-body de Bootstrap 4. La piel nunca los re-tematizo, asi
   que conservaban el fondo blanco de fabrica mientras el texto
   heredaba el color claro de la piel: ratio 1.13, ilegible.
   Aqui se les da la superficie del tema.
   ============================================================ */
.card {
  background: var(--color-surface);
  color: var(--color-text);
  border: var(--card-border);
  border-radius: var(--radius-md);
}
.card-header {
  background: var(--color-surface-sunken);
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
}
.card-body { color: var(--color-text); }
.card-footer {
  background: var(--color-surface-sunken);
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
}
.card-title,
.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6 { color: var(--color-text); }
/* Los .col-sm-* solo deben pintar fondo si alguien se lo puso;
   el blanco venia heredado de la utilidad bg-white de Bootstrap. */
.col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6,
.col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {
  background-color: transparent;
}

/* Etiquetas y ayudas de formulario Bootstrap */
.card-body .form-group > label,
.card-body label:not(.form-check-label) { color: var(--color-text); }
.form-text,
.text-muted { color: var(--color-text-muted); }

/* Nombres de filtro de DataTables SearchPanes: fondo blanco fijo */
.dtsp-name,
.dtsp-name a { color: var(--color-text); }
.dtsp-disabledButton { color: var(--color-text-muted); }

/* Boton secundario: el fondo translucido dejaba el texto casi del
   mismo tono. Se refuerza el contraste del texto. */
.btn-default { color: var(--color-text); }
.btn-default:hover,
.btn-default:focus { color: var(--color-text); }

/* Contenedores de scroll y paneles de DataTables: traen fondo blanco
   fijo y el texto de la piel es claro, asi que el contenido quedaba
   invisible. Se les da la superficie del tema. */
div.dt-button-collection,
div.dt-button-collection .dropdown-menu { background: var(--color-surface); }
div.dt-button-collection .dropdown-menu > li > a { color: var(--color-text); }
.dtsp-pane,
.dtsp-paneButton,
.dtsp-searchPanes,
.dtsp-titleRow { background: var(--color-surface); color: var(--color-text); }
.dtsp-name,
.dtsp-name a,
.dtsp-count,
.dtsp-nameButton { color: var(--color-text); }
.dtsp-dull,
.dtsp-disabledButton { color: var(--color-text-muted); }

/* Envoltorio de scroll de DataTables: el vendor fija un fondo blanco
   dentro de un @media que gana a la regla base. Se refuerza. */

/* El envoltorio de scroll de DataTables se resiste a quedar transparente
   en algunos motores (mantiene blanco aunque el CSS lo niegue). Se le da
   directamente la superficie del tema para que nunca quede claro. */
.dataTables_scrollBody,
.dataTables_scrollHead {
  background-color: var(--color-surface) !important;
}

/* El CSS de SearchPanes fija fondo blanco con un selector compuesto que
   gana por especificidad al .dataTables_scrollBody simple. Se replica la
   ruta completa del DOM para imponerse. */
div.dtsp-searchPane div.dataTables_wrapper div.dataTables_scrollBody,
div.dtsp-searchPane div.dataTables_wrapper div.dataTables_scrollHead {
  background-color: var(--color-surface) !important;
}
div.dtsp-searchPane div.dataTables_wrapper div.dataTables_scrollBody table {
  background-color: transparent !important;
}

/* Ritmo vertical de la franja: la fila de Entrada/Salida/Proyecto y la de
   observaciones respiran igual que el bloque de costes adicionales. Va al
   final para ganar por orden a .diary-entry-group .row.form-group (8px). */
#editDiariesModal #editDiariesContainer .row.form-group[id^="line-"],
#editDiariesModal #editDiariesContainer .row.form-group[id^="obs-line-"] {
  /* !important porque .diary-entry-group .row.form-group fija 8px asi. */
  margin-bottom: 20px !important;
}

/* La ultima fila no necesita margen extra antes del borde. */
#editDiariesModal #editDiariesContainer .row.form-group[id^="other-costs-line-"] {
  margin-bottom: 0 !important;
}
