:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-alt: #0f172a;
  --text: #0f172a;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #0ea5e9;
  --accent-strong: #0284c7;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --radius: 12px;
  --shadow: 0 10px 35px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 4px 14px rgba(15, 23, 42, 0.06);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-strong);
}

a.btn-login,
a.btn-login:visited,
a.btn-login:hover,
a.btn-login:focus,
a.btn-login:active {
  color: #fff;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.navbar .brand {
  font-weight: 700;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(140deg, var(--accent), var(--accent-strong));
}

.nav-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-link {
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 600;
}

.nav-link.active,
.nav-link:hover {
  background: #e0f2fe;
  color: var(--accent-strong);
}

.content {
  padding: 32px 32px 48px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.page-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.page-title h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.4px;
}

.muted {
  color: var(--muted);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-soft);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

/* Catálogo: grid más espaciado y 4 columnas en desktop */
#catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 1024px) {
  #catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  #catalog-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

.catalog-card {
  padding: 24px;
}

.catalog-video {
  color: var(--accent);
  cursor: pointer;
}

.catalog-video:hover {
  text-decoration: underline;
  color: var(--accent-strong);
}

.dev-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #eef6ff;
  border: 1px solid #d6e4ff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.08);
  animation: devBannerFadeIn 240ms ease-out;
}

.dev-banner strong {
  display: block;
  font-weight: 600;
  color: #1e3a8a;
}

.dev-banner p {
  margin: 2px 0 0;
  font-size: 14px;
  color: #475569;
}

.dev-icon {
  font-size: 20px;
  line-height: 1;
}

@keyframes devBannerFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat .label {
  color: var(--muted);
  font-size: 14px;
}

.stat .value {
  font-size: 24px;
  font-weight: 700;
}

.ddjj-summary-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  min-height: 118px;
  padding: 18px;
}

.ddjj-summary-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 3px;
  border-radius: 999px;
  background: var(--ddjj-summary-accent, #38bdf8);
}

.ddjj-summary-today {
  --ddjj-summary-accent: #f97316;
}

.ddjj-summary-month {
  --ddjj-summary-accent: #2563eb;
}

.ddjj-summary-next {
  --ddjj-summary-accent: #8b5cf6;
}

.ddjj-summary-pending-cuits {
  --ddjj-summary-accent: #ef4444;
}

.ddjj-summary-icon {
  width: 58px;
  height: 58px;
  min-width: 58px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.ddjj-summary-icon svg {
  width: 29px;
  height: 29px;
  display: block;
}

.ddjj-summary-icon-alert {
  background: #ffedd5;
  color: #ea580c;
}

.ddjj-summary-icon-green {
  background: #dbeafe;
  color: #2563eb;
}

.ddjj-summary-icon-purple {
  background: #ede9fe;
  color: #7c3aed;
}

.ddjj-summary-icon-rose {
  background: #fee2e2;
  color: #dc2626;
}

.ddjj-summary-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}

.ddjj-summary-content .label,
.ddjj-summary-content .value,
.ddjj-summary-content .muted {
  margin: 0;
}

.ddjj-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.ddjj-section-header h2 {
  margin: 0;
}

.ddjj-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ddjj-filters label {
  display: grid;
  gap: 5px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.ddjj-filters select {
  min-width: 150px;
  height: 38px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  padding: 0 10px;
  font-size: 14px;
}

.ddjj-calendar-list {
  display: grid;
  gap: 12px;
}

.ddjj-day-group {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.ddjj-day-group h3 {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
}

.ddjj-day-items {
  display: grid;
  gap: 8px;
}

.ddjj-due-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.ddjj-due-row:hover,
.ddjj-due-row.is-selected {
  border-color: #bae6fd;
  background: #f0f9ff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}

.ddjj-calendar-item {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.ddjj-calendar-item:hover,
.ddjj-calendar-item.is-selected {
  border-color: #bae6fd;
  background: #f8fbff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.ddjj-calendar-date {
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.ddjj-calendar-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.ddjj-calendar-title strong {
  color: #0f172a;
  font-size: 15px;
}

.ddjj-calendar-title span {
  color: #64748b;
  font-size: 13px;
}

.ddjj-calendar-counts {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.ddjj-count-pill,
.ddjj-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.ddjj-count-pill {
  background: #f1f5f9;
  color: #334155;
}

.ddjj-status-badge.al-dia {
  background: #ecfdf3;
  color: #15803d;
}

.ddjj-status-badge.proximo {
  background: #fffbeb;
  color: #b45309;
}

.ddjj-status-badge.hoy {
  background: #fff7ed;
  color: #c2410c;
}

.ddjj-status-badge.pendiente {
  background: #eef6ff;
  color: #1d4ed8;
}

.ddjj-status-badge.vencido {
  background: #fef2f2;
  color: #b91c1c;
}

.ddjj-month-card {
  display: grid;
  gap: 12px;
}

.ddjj-month-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ddjj-month-header h2 {
  margin: 0;
}

.ddjj-calendar-section-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  flex: 1 1 420px;
  min-width: 0;
}

.ddjj-calendar-section-icon {
  width: 62px;
  height: 62px;
  margin-top: 12px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  color: #2563eb;
  flex: 0 0 auto;
}

.ddjj-calendar-section-icon svg {
  width: 34px;
  height: 34px;
}

.ddjj-calendar-section-copy {
  min-width: 0;
  flex: 1 1 260px;
}

.ddjj-calendar-section-title {
  margin: 0;
}

.ddjj-calendar-section-description {
  margin: 4px 0 0;
}

.ddjj-selection-hint {
  margin: 4px 0 0;
  font-size: 12px;
}

.ddjj-page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.ddjj-manage-forms-btn .refresh-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.calendar-toolbar {
  display: flex;
  flex: 0 0 100%;
  width: 100%;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: nowrap;
  margin-top: 18px;
  margin-bottom: 22px;
  order: 3;
}

.calendar-filters-group {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: nowrap;
  min-width: 0;
  flex: 0 0 auto;
  margin-left: 0;
}

.ddjj-quick-select,
.calendar-quick-actions {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  flex: 0 0 auto;
  justify-self: start;
  margin: 0;
  margin-right: auto;
}

.ddjj-quick-select button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.ddjj-quick-select button:hover {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.ddjj-quick-select button.is-active {
  border-color: #7dd3fc;
  background: #e0f2fe;
  color: #0369a1;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.14);
}

.calendar-cuit-filter {
  flex: 0 0 250px;
  width: 250px;
  max-width: 100%;
  margin-left: 0;
  display: grid;
  gap: 6px;
  position: relative;
  min-width: 0;
}

.calendar-form-filter {
  flex: 0 0 140px;
  width: 140px;
  max-width: 100%;
  margin-left: 0;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.calendar-status-filter {
  flex: 0 0 155px;
  width: 155px;
  max-width: 100%;
  margin-left: 0;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.calendar-form-filter label {
  display: inline-flex;
  align-items: center;
  margin: 0;
  color: #1e293b;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.calendar-status-filter label {
  display: inline-flex;
  align-items: center;
  margin: 0;
  color: #1e293b;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.calendar-form-filter-row {
  display: flex;
  align-items: center;
  min-width: 0;
}

.calendar-status-filter-row {
  display: flex;
  align-items: center;
  min-width: 0;
}

.calendar-form-filter select {
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 1px solid #d7e0ee;
  border-radius: 14px;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%233b4a67' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
  color: #0f172a;
  padding: 0 38px 0 14px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.2;
  outline: none;
  appearance: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.calendar-status-filter select {
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 1px solid #d7e0ee;
  border-radius: 14px;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%233b4a67' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
  color: #0f172a;
  padding: 0 38px 0 14px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.2;
  outline: none;
  appearance: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.calendar-form-filter select:focus {
  border-color: #5b8cff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14), 0 8px 18px rgba(37, 99, 235, 0.08);
}

.calendar-status-filter select:focus {
  border-color: #5b8cff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14), 0 8px 18px rgba(37, 99, 235, 0.08);
}

.calendar-cuit-filter label {
  display: inline-flex;
  align-items: center;
  margin: 0;
  color: #1e293b;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.calendar-cuit-filter-row {
  display: flex;
  align-items: center;
  min-width: 0;
}

.calendar-cuit-input-wrap {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-width: 0;
}

.calendar-cuit-filter input,
.calendar-cuit-input {
  width: 100%;
  height: 42px;
  border: 1px solid #d7e0ee;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  color: #0f172a;
  padding: 0 42px 0 15px;
  font: inherit;
  font-size: 13.5px;
  line-height: 42px;
  outline: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.calendar-cuit-filter input::placeholder,
.calendar-cuit-input::placeholder {
  color: #8492a6;
  opacity: 1;
}

.calendar-cuit-filter input::-webkit-search-cancel-button,
.calendar-cuit-input::-webkit-search-cancel-button {
  margin-right: 22px;
}

.calendar-cuit-filter input:focus,
.calendar-cuit-input:focus {
  outline: none;
  border-color: #5b8cff;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14), 0 8px 18px rgba(37, 99, 235, 0.08);
}

.calendar-cuit-search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  display: inline-flex;
  width: 17px;
  height: 17px;
  color: #2563eb;
  transform: translateY(-50%);
  pointer-events: none;
}

.calendar-cuit-search-icon svg {
  width: 17px;
  height: 17px;
}

.calendar-clear-cuit-button {
  height: 42px;
  flex: 0 0 auto;
  padding: 0 14px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}

.calendar-clear-cuit-button:hover {
  background: #f8fafc;
}

.calendar-cuit-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 50;
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #d7e0ee;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}

.calendar-cuit-dropdown[hidden] {
  display: none;
}

.calendar-cuit-option {
  width: 100%;
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.calendar-cuit-option:hover {
  background: #f1f5f9;
}

.calendar-cuit-option-main {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}

.calendar-cuit-option-sub,
.calendar-cuit-empty {
  font-size: 12px;
  color: #64748b;
}

.calendar-cuit-empty {
  padding: 10px 12px;
}

.ddjj-month-controls {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  margin-top: 1.2%;
  margin-right: 1%;
  white-space: nowrap;
}

.ddjj-month-controls strong {
  min-width: 210px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 800;
  text-align: center;
}

.ddjj-month-controls .pagination-btn {
  width: 46px;
  height: 46px;
  min-width: 46px;
  padding: 0;
  border-radius: 14px;
  color: #1d4ed8;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.ddjj-month-controls .pagination-btn:hover {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e40af;
}

.ddjj-month-controls .icon-arrow {
  width: 18px;
  height: 18px;
}

.ddjj-weekdays,
.ddjj-month-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.ddjj-weekdays span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.ddjj-month-day {
  min-height: 104px;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.ddjj-month-day.is-empty {
  border-color: transparent;
  background: transparent;
  cursor: default;
}

.ddjj-month-day.is-today {
  border-color: #bae6fd;
  background: #f8fcff;
}

.ddjj-month-day.is-holiday {
  background: linear-gradient(180deg, #fffdf5 0%, #fff 100%);
}

.ddjj-month-day.is-today.is-holiday {
  border-color: #bae6fd;
  background: linear-gradient(135deg, #f0f9ff 0%, #fffdf5 100%);
}

.ddjj-month-day:hover:not(.is-empty),
.ddjj-month-day:focus-visible:not(.is-empty) {
  border-color: #93c5fd;
  background: #f8fbff;
  box-shadow: 0 0 0 2px rgba(147, 197, 253, 0.18);
  outline: none;
}

.ddjj-month-day.is-selected {
  border-color: #2563eb;
  border-width: 2px;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.ddjj-month-day.is-today.is-selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.ddjj-month-day-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
}

.ddjj-month-day-top {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.ddjj-month-day.is-today .ddjj-month-day-number {
  background: #bae6fd;
  color: #0369a1;
}

.ddjj-month-day.is-today.is-holiday .ddjj-month-day-number {
  background: transparent;
  color: #0369a1;
}

.ddjj-month-day.is-selected .ddjj-month-day-number {
  color: #1d4ed8;
  font-weight: 800;
}

.ddjj-month-day.is-today.is-selected .ddjj-month-day-number {
  background: #bae6fd;
  color: #0369a1;
}

.ddjj-holiday-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px 7px;
  border: 1px solid #fde68a;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.ddjj-month-day.is-today.is-holiday .ddjj-holiday-badge {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.ddjj-month-events {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.ddjj-month-event {
  display: grid;
  gap: 1px;
  width: 100%;
  padding: 5px 6px;
  border: 1px solid transparent;
  border-radius: 8px;
  appearance: none;
  font-size: 10.5px;
  font-family: inherit;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}

.ddjj-month-event:hover {
  filter: brightness(0.98);
}

.ddjj-month-event strong,
.ddjj-month-event span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ddjj-month-event strong {
  font-size: 11px;
  font-weight: 800;
}

.ddjj-month-event.vencido {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.ddjj-month-event.hoy {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}

.ddjj-month-event.proximo {
  border-color: #fde68a;
  background: #fffbeb;
  color: #a16207;
}

.ddjj-month-event.pendiente {
  border-color: #dbeafe;
  background: #eff6ff;
  color: #1d4ed8;
}

.ddjj-day-detail-card {
  display: grid;
  gap: 14px;
}

.ddjj-day-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.ddjj-day-detail-header h2 {
  margin: 0;
}

.ddjj-day-detail-header .muted {
  margin: 6px 0 0;
}

.ddjj-day-detail-heading {
  min-width: 250px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.ddjj-day-detail-heading-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: #eff6ff;
  color: #2563eb;
}

.ddjj-day-detail-heading-icon svg {
  width: 26px;
  height: 26px;
}

.ddjj-day-detail-summary-slot {
  min-width: 0;
  flex: 1 1 700px;
  max-width: 760px;
}

.ddjj-day-detail-content {
  min-width: 0;
}

.client-drawer.ddjj-forms-drawer {
  width: clamp(1100px, 75vw, 1300px);
  max-width: calc(100vw - 28px);
}

.ddjj-forms-drawer-subtitle {
  margin: 4px 0 0;
  color: #6b7fa6;
  font-size: 13px;
  font-weight: 600;
}

.ddjj-forms-header-main {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.ddjj-forms-header-icon {
  width: 60px;
  height: 60px;
  margin-top:  -4px;
  border-radius: 12px;
  background: #e8f0ff;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.ddjj-forms-header-icon svg {
  width: 35px;
  height: 35px;
}

.ddjj-forms-drawer-content {
  display: grid;
  gap: 16px;
}

.ddjj-forms-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 14px;
  flex-wrap: nowrap;
  padding: 14px;
  border: 1px solid #dfe7f3;
  border-radius: 14px;
  background: #f9fbff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  overflow-x: auto;
  overflow-y: hidden;
}

.ddjj-forms-filters {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
  flex: 0 0 auto;
}

.ddjj-forms-filters label {
  display: grid;
  gap: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.ddjj-forms-filters input,
.ddjj-forms-filters select {
  height: 42px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  outline: none;
}

.ddjj-forms-filters input:focus,
.ddjj-forms-filters select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14), 0 8px 18px rgba(37, 99, 235, 0.12);
}

.ddjj-forms-filters #ddjj-forms-form-filter {
  min-width: 140px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 0 44px 0 12px;
  background-image:
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%),
    url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232f4a73' stroke-width='2.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E\");
  background-repeat: no-repeat, no-repeat;
  background-position: 0 0, right 12px center;
  background-size: 100% 100%, 16px;
  border-color: #d7e1f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  cursor: pointer;
}

.ddjj-forms-filters #ddjj-forms-form-filter:hover {
  border-color: #bfd0ea;
  background-image:
    linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%),
    url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231f3659' stroke-width='2.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E\");
}

.ddjj-forms-filters #ddjj-forms-form-filter:focus {
  background-image:
    linear-gradient(180deg, #ffffff 0%, #f0f7ff 100%),
    url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231d4ed8' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E\");
}

.ddjj-forms-filters #ddjj-forms-form-filter option {
  color: #0f172a;
  background: #ffffff;
  padding: 8px 10px;
}

.ddjj-forms-filters #ddjj-forms-form-filter option:checked {
  background: #eaf3ff;
  color: #1d4ed8;
}

.ddjj-forms-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  justify-content: flex-start;
  flex: 0 0 auto;
  margin-left: auto;
}

.ddjj-forms-pending-count {
  color: #4b5f7f;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  height: 40px;
  border: 1px solid #e0e8f5;
  border-radius: 12px;
  background: #f5f8ff;
  flex: 0 0 auto;
}

.ddjj-save-forms-btn {
  border-color: #d1d9e6;
  background: #ffffff;
  color: #334155;
}

.ddjj-save-forms-btn:hover {
  border-color: #c2cedf;
  background: #f8fafc;
}

.ddjj-save-forms-btn.is-pending {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.ddjj-save-forms-btn.is-pending:hover {
  border-color: #1d4ed8;
  background: #1d4ed8;
  color: #fff;
  box-shadow: 0 12px 26px rgba(29, 78, 216, 0.28);
}

.ddjj-discard-forms-btn {
  border-color: #d1d9e6;
  background: #fff;
  color: #334155;
}

.ddjj-import-forms-btn {
  border-color: #0ea5e9;
  background: #fff;
  color: #0369a1;
}

.ddjj-import-forms-btn:hover {
  border-color: #0284c7;
  background: #eff6ff;
  color: #075985;
}

.ddjj-delete-table-btn {
  border-color: #dc2626;
  background: #dc2626;
  color: #fff;
}

.ddjj-delete-table-btn:hover {
  border-color: #b91c1c;
  background: #b91c1c;
  color: #fff;
}

.ddjj-forms-actions .required-forms-delete-table-btn {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.22);
}

.ddjj-forms-actions .required-forms-delete-table-btn:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(185, 28, 28, 0.28);
}

.ddjj-forms-actions .required-forms-delete-table-btn:active {
  background: #991b1b;
  border-color: #991b1b;
  color: #ffffff;
}

.ddjj-forms-schema-alert {
  margin: 0;
}

.ddjj-forms-schema-alert code {
  display: block;
  margin-top: 8px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.ddjj-forms-message {
  min-height: 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
}

.ddjj-forms-message.is-success {
  color: #15803d;
}

.ddjj-forms-message.is-error {
  color: #dc2626;
}

.ddjj-import-backdrop {
  z-index: 2500;
}

.ddjj-import-backdrop:not(.is-open) {
  pointer-events: none;
}

.ddjj-import-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.98);
  width: min(560px, calc(100vw - 32px));
  border-radius: 16px;
  border: 1px solid #dbe3ef;
  background: #fff;
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.3);
  z-index: 2600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  padding: 18px 18px 16px;
}

.ddjj-import-modal.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.ddjj-import-modal:not(.is-open) {
  pointer-events: none;
}

.ddjj-import-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ddjj-import-modal-header h3 {
  margin: 0;
  color: #0f172a;
  font-size: 20px;
  font-weight: 800;
}

.ddjj-import-modal-copy {
  margin: 10px 0 0;
  color: #475569;
  font-size: 14px;
}

.ddjj-import-modal-summary {
  margin-top: 12px;
  border: 1px solid #dbe3ef;
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px;
  color: #334155;
  font-size: 14px;
}

.ddjj-import-modal-summary p {
  margin: 0;
}

.ddjj-import-summary-warn {
  margin-top: 8px !important;
  color: #b45309;
  font-weight: 700;
}

.ddjj-import-modal-actions {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.ddjj-import-mode-update {
  border-color: #16a34a;
  background: #16a34a;
  color: #fff;
}

.ddjj-import-mode-update:hover {
  border-color: #15803d;
  background: #15803d;
}

.ddjj-import-mode-replace {
  border-color: #dc2626;
  background: #dc2626;
  color: #fff;
}

.ddjj-import-mode-replace:hover {
  border-color: #b91c1c;
  background: #b91c1c;
}

.ddjj-import-mode-cancel {
  border-color: #d1d9e6;
  background: #fff;
  color: #334155;
}

.ddjj-import-mode-cancel:hover {
  border-color: #b8c3d6;
  background: #f8fafc;
}

.ddjj-import-modal .import-confirm-add {
  background: #dcfce7;
  border-color: #22c55e;
  color: #15803d;
  font-weight: 700;
}

.ddjj-import-modal .import-confirm-add:hover {
  background: #22c55e;
  border-color: #16a34a;
  color: #ffffff;
}

.ddjj-import-modal .import-confirm-replace {
  background: #fee2e2;
  border-color: #ef4444;
  color: #b91c1c;
  font-weight: 700;
}

.ddjj-import-modal .import-confirm-replace:hover {
  background: #ef4444;
  border-color: #dc2626;
  color: #ffffff;
}

.ddjj-import-modal .import-confirm-cancel {
  color: #334155;
  background: #ffffff;
  border-color: #dbe4f0;
}

.ddjj-import-modal .import-confirm-cancel:hover {
  color: #1e293b;
  background: #f8fafc;
  border-color: #cbd5e1;
}

.ddjj-delete-modal .ddjj-import-modal-copy {
  margin-bottom: 0;
}

.ddjj-delete-date-input-wrap {
  margin-top: 12px;
  display: grid;
  gap: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.ddjj-delete-date-input-wrap input {
  height: 40px;
  border: 1px solid #dbe3ef;
  border-radius: 11px;
  background: #fff;
  color: #0f172a;
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  outline: none;
}

.ddjj-delete-date-input-wrap input:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.ddjj-delete-date-error {
  margin: 8px 0 0;
  color: #dc2626;
  font-size: 12px;
  font-weight: 700;
}

.ddjj-delete-confirm-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ddjj-forms-table-wrap {
  --cuit-col-width: 230px;
  max-height: calc(100vh - 280px);
  overflow: auto;
  position: relative;
  isolation: isolate;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
}

.ddjj-forms-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.ddjj-forms-table th,
.ddjj-forms-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #e7edf6;
  text-align: left;
  vertical-align: middle;
}

.ddjj-forms-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f3f7ff;
  color: #526a90;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.ddjj-forms-table tr:last-child td {
  border-bottom: 0;
}

.ddjj-forms-empty {
  color: #64748b;
  text-align: center;
}

.ddjj-forms-pagination .table-footer {
  margin-top: 10px;
}

.ddjj-forms-matrix {
  table-layout: auto;
  position: relative;
}

.ddjj-forms-matrix th,
.ddjj-forms-matrix td {
  position: relative;
  background: #fff;
}

.ddjj-forms-matrix thead th {
  z-index: 2;
}

.ddjj-forms-matrix tbody td,
.ddjj-forms-matrix tbody th {
  z-index: 1;
}

.ddjj-forms-matrix tbody tr:hover {
  background: #f8fafc;
}

.ddjj-forms-matrix tbody tr:hover .ddjj-matrix-cuit-cell {
  background: #fff;
}

.ddjj-matrix-cuit-col,
.ddjj-matrix-cuit-cell {
  position: sticky;
  left: 0;
  z-index: 10;
  width: var(--cuit-col-width);
  min-width: var(--cuit-col-width);
  max-width: var(--cuit-col-width);
  white-space: nowrap;
  background: #fff;
  background-clip: border-box;
  box-shadow: 1px 0 0 #e2e8f0, 8px 0 14px -12px rgba(15, 23, 42, 0.35);
  overflow: hidden;
  text-overflow: ellipsis;
}

.ddjj-matrix-cuit-col {
  top: 0;
  z-index: 14;
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
}

.ddjj-matrix-cuit-cell {
  color: #0f172a;
  font-weight: 900;
  top: auto;
  border-right: 1px solid #e2e8f0;
}

.ddjj-matrix-person-cell {
  display: grid;
  gap: 2px;
  line-height: 1.2;
}

.ddjj-matrix-person-name {
  font-size: 13px;
  font-weight: 800;
  color: #0f2347;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ddjj-matrix-person-cuit {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.ddjj-matrix-person-cuit-only {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
}

.ddjj-forms-matrix thead .ddjj-matrix-form-col {
  position: sticky;
  top: 0;
  z-index: 8;
  background: #f8fafc;
}

.ddjj-forms-matrix thead .ddjj-matrix-cuit-col::after,
.ddjj-forms-matrix tbody .ddjj-matrix-cuit-cell::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  bottom: -1px;
  width: 1px;
  background: #e2e8f0;
  pointer-events: none;
}

.ddjj-matrix-form-col {
  min-width: 92px;
  max-width: 96px;
  text-align: center !important;
  white-space: nowrap;
}

.ddjj-matrix-toggle-cell {
  text-align: center !important;
}

.ddjj-matrix-toggle {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid #c7d8f4;
  background: #f7fbff;
  color: #6b88b8;
  font: inherit;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease, box-shadow 120ms ease, color 120ms ease;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.ddjj-forms-actions .refresh-btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.ddjj-forms-actions .refresh-btn {
  height: 40px;
  padding: 0 12px;
  font-size: 13px;
  white-space: nowrap;
  flex: 0 0 auto;
}

#ddjj-forms-search {
  min-width: 170px;
}

.ddjj-matrix-toggle:hover {
  transform: translateY(-1px);
  border-color: #7aa9ff;
  background: #edf5ff;
  color: #3f67a8;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.16);
}

.ddjj-matrix-toggle.is-active {
  border-color: #16a34a;
  background: #22c55e;
  color: #fff;
  box-shadow: 0 8px 18px rgba(22, 163, 74, 0.28);
}

.ddjj-matrix-toggle.is-inactive {
  border-color: #bcd2f5;
  background: #f5f9ff;
  color: #2563eb;
}

.ddjj-matrix-toggle.is-pending {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

.ddjj-matrix-toggle span {
  transform: translateY(-1px);
}

.ddjj-day-detail-actions {
  margin-top: 12px;
}

.ddjj-detail-summary-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.ddjj-detail-summary-card {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.ddjj-detail-summary-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.ddjj-detail-summary-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.ddjj-detail-summary-card span {
  display: block;
  color: #64748b;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.25;
}

.ddjj-detail-summary-card strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: 23px;
  line-height: 1;
}

.ddjj-detail-summary-card.summary-total {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #2563eb;
}

.ddjj-detail-summary-card.summary-total .ddjj-detail-summary-icon {
  background: #dbeafe;
  color: #2563eb;
}

.ddjj-detail-summary-card.summary-presented {
  background: #ecfdf3;
  border-color: #bbf7d0;
  color: #16a34a;
}

.ddjj-detail-summary-card.summary-presented .ddjj-detail-summary-icon {
  background: #dcfce7;
  color: #16a34a;
}

.ddjj-detail-summary-card.summary-missing {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.ddjj-detail-summary-card.summary-missing .ddjj-detail-summary-icon {
  background: #fee2e2;
  color: #dc2626;
}

.ddjj-day-detail-filters {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.detail-filters-left {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-filters-right {
  margin-left: auto;
  display: flex;
  align-items: flex-end;
}

.ddjj-day-detail-filters label {
  display: grid;
  gap: 5px;
  min-width: 180px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.ddjj-day-detail-filters select {
  height: 38px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  padding: 0 10px;
  font: inherit;
  font-size: 14px;
}

.ddjj-day-detail-filters select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.ddjj-detail-clear-filters {
  height: 38px;
  padding: 0 12px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.ddjj-detail-clear-filters:hover {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.export-dropdown {
  position: relative;
}

.export-button {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.detail-export-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.export-button:hover {
  background: #f8fbff;
  border-color: #bfdbfe;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.export-button:active {
  transform: translateY(1px);
}

.export-button svg {
  width: 18px;
  height: 18px;
  color: #1e40af;
  fill: none;
  stroke: currentColor;
  flex: 0 0 auto;
}

.export-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  min-width: 150px;
  padding: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

.export-menu[hidden] {
  display: none;
}

.export-menu button {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.export-menu button:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.ddjj-day-detail-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.ddjj-day-detail-table {
  min-width: 980px;
}

.ddjj-day-detail-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.ddjj-day-detail-table td {
  color: #0f172a;
  font-size: 13px;
  vertical-align: middle;
  white-space: nowrap;
}

.ddjj-row-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.ddjj-row-status.presentado {
  background: #ecfdf3;
  color: #15803d;
}

.ddjj-row-status.faltante {
  background: #fef2f2;
  color: #b91c1c;
}

@media (max-width: 900px) {
  .ddjj-section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .ddjj-filters {
    align-items: stretch;
  }

  .ddjj-filters label,
  .ddjj-filters select {
    width: 100%;
  }

  .ddjj-calendar-item {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .ddjj-calendar-counts {
    justify-content: flex-start;
  }

  .ddjj-due-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .ddjj-month-header {
    flex-direction: column;
  }

  .ddjj-month-controls {
    width: 100%;
    justify-content: space-between;
  }

  .ddjj-month-controls strong {
    min-width: 0;
    flex: 1;
  }

  .calendar-cuit-filter {
    width: 100%;
    margin-left: 0;
    flex: 1 1 300px;
    gap: 6px;
  }

  .calendar-filters-group {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
  }

  .calendar-cuit-filter-row {
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
  }

  .calendar-cuit-filter input,
  .calendar-cuit-filter button,
  .calendar-cuit-input-wrap {
    width: 100%;
    flex-basis: auto;
  }

  .calendar-form-filter {
    flex: 1 1 190px;
    gap: 6px;
  }

  .calendar-status-filter {
    flex: 1 1 190px;
    gap: 6px;
  }

  .calendar-form-filter-row {
    flex: 0 1 220px;
    min-width: 0;
  }

  .calendar-status-filter-row {
    flex: 0 1 220px;
    min-width: 0;
  }

  .calendar-form-filter select {
    width: 100%;
  }

  .calendar-status-filter select {
    width: 100%;
  }

  .ddjj-day-detail-filters {
    align-items: stretch;
  }

  .detail-filters-left,
  .detail-filters-right {
    width: 100%;
  }

  .detail-filters-left {
    align-items: stretch;
  }

  .ddjj-day-detail-header {
    align-items: stretch;
    flex-direction: column;
  }

  .ddjj-day-detail-summary-slot {
    flex-basis: auto;
    width: 100%;
  }

  .ddjj-detail-summary-cards {
    grid-template-columns: 1fr;
  }

  .ddjj-day-detail-filters label,
  .ddjj-day-detail-filters select,
  .ddjj-detail-clear-filters,
  .export-dropdown,
  .export-button {
    width: 100%;
  }

  .export-menu {
    left: 0;
    right: auto;
    width: 100%;
  }
}

@media (max-width: 760px) {
  .ddjj-month-card {
    overflow-x: auto;
  }

  .ddjj-weekdays,
  .ddjj-month-calendar {
    min-width: 720px;
  }

  .ddjj-month-day {
    min-height: 100px;
    padding: 7px;
  }
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}

.history-table th,
.history-table td {
  padding: 14px 12px;
  vertical-align: middle;
  line-height: 1.4;
}

.history-table tbody tr {
  min-height: 54px;
  border-bottom: 1px solid #e2e8f0;
}

.history-table tbody tr:hover {
  background: #f8fafc;
}

.history-table {
  min-width: 860px;
}

.history-table th:first-child,
.history-table td:first-child {
  min-width: 145px;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 6px;
  border-top: 1px solid #e2e8f0;
}

.rows-per-page {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  padding: 10px 14px;
  border-radius: 12px;
  width: fit-content;
}

.rows-icon {
  width: 36px;
  height: 36px;
  background: #e2e8f0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rows-icon svg {
  width: 18px;
  height: 18px;
  fill: #3b82f6;
}

.rows-label {
  font-size: 14px;
  color: #64748b;
}

.rows-select {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 14px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rows-select:hover {
  border-color: #3b82f6;
}

.rows-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.pagination-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pagination-btn,
.page-number {
  height: 36px;
  min-width: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-arrow {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.pagination-btn:hover,
.page-number:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.page-number.active {
  background: #0ea5e9;
  border-color: #0ea5e9;
  color: #fff;
  box-shadow: 0 6px 14px rgba(14, 165, 233, 0.25);
}

.pagination-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  background: #f8fafc;
}

.pagination-ellipsis {
  color: #94a3b8;
  padding: 0 4px;
}

.page-info {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .table-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .pagination-wrapper {
    justify-content: space-between;
    flex-wrap: wrap;
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.badge.success {
  background: #ecfdf3;
  color: var(--success);
}

.badge.error {
  background: #fef2f2;
  color: var(--danger);
}

.badge.waiting {
  background: #fffbeb;
  color: var(--warning);
}

.pill {
  padding: 6px 12px;
  background: #e5e7eb;
  border-radius: 12px;
  font-weight: 600;
  color: var(--text);
  border: none;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
  box-shadow: var(--shadow-soft);
}

.btn.secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn:active {
  transform: translateY(0);
}

.btn-apply-filters {
  height: 42px;
  padding: 0 22px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-apply-filters svg {
  width: 16px;
  height: 16px;
  color: currentColor;
  flex: 0 0 auto;
}

.btn-apply-filters:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
}

.btn-apply-filters:active {
  transform: translateY(0);
}

.refresh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid #d9e2f1;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: #1f2a44;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 14px rgba(31, 42, 68, 0.06);
  transition: all 0.2s ease;
  cursor: pointer;
}

.refresh-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(31, 42, 68, 0.1);
  border-color: #c8d7f2;
  background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
}

.refresh-btn:active {
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(31, 42, 68, 0.06);
}

.refresh-btn:disabled,
.refresh-btn.is-loading {
  opacity: 0.75;
  cursor: not-allowed;
}

.refresh-btn .refresh-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex: 0 0 auto;
}

.refresh-btn.is-loading .refresh-icon {
  animation: refresh-spin 0.8s linear infinite;
}

@keyframes refresh-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.section {
  margin-top: 20px;
}

.section h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.auth-wrapper {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 10% 20%, rgba(14, 165, 233, 0.12), transparent 28%), radial-gradient(circle at 90% 10%, rgba(2, 132, 199, 0.12), transparent 25%), var(--bg);
  padding: 32px 16px;
}

.auth-top-link {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow-soft);
  transition: background 120ms ease, color 120ms ease, transform 120ms ease;
}

.auth-top-link:hover {
  background: #f3f4f6;
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.auth-card {
  width: min(420px, 100%);
  background: var(--surface);
  border-radius: 18px;
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin: 0 0 6px;
  font-size: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-group label {
  font-weight: 600;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f9fafb;
  font-size: 15px;
}

.form-group input:focus {
  outline: 2px solid #e0f2fe;
  border-color: #bae6fd;
}

.password-field {
  position: relative;
}

.password-field input {
  width: 100%;
  padding-right: 46px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.18s ease, color 0.18s ease;
}

.password-toggle:hover {
  background: #eff6ff;
  color: #0284c7;
}

.password-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.22);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
}

.autocomplete-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 200px; /* ~5 items */
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
  z-index: 20;
  padding: 4px 0;
}

.autocomplete-item {
  padding: 10px 12px;
  cursor: pointer;
  color: var(--text);
}

.autocomplete-item:hover,
.autocomplete-item[aria-selected="true"] {
  background: #e0f2fe;
  color: var(--accent-strong);
}

.helper {
  color: var(--muted);
  font-size: 14px;
}

.horizontal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-link-row {
  margin: -2px 0 8px;
  display: flex;
  justify-content: flex-end;
}

.forgot-password-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
  margin-bottom: 18px;
}

.auth-inline-link {
  color: #2563eb;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.18s ease;
}

.auth-inline-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.placeholder-block {
  padding: 18px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  background: #f9fafb;
  color: var(--muted);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filters-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  padding: 24px;
  margin-bottom: 18px;
  transition: all 0.2s ease;
}

.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.filters-header-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filters-header-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #eff6ff;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.filters-header-icon svg {
  width: 20px;
  height: 20px;
}

.filters-title {
  margin: 0;
  font-weight: 600;
  font-size: 18px;
  color: #0f172a;
}

.filters-subtitle {
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 14px;
}

.filters-reset {
  background: transparent;
  border: none;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.filters-reset:hover {
  opacity: 0.8;
}

.filters-reset svg {
  width: 16px;
  height: 16px;
}

.clear-filters-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #2563eb;
  background: transparent;
  border: none;
  font-weight: 700;
  cursor: pointer;
}

.clear-filters-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
}

.clear-filters-btn:hover {
  opacity: 0.85;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.filters-field {
  margin: 0;
}

.filters-field input,
.filters-field select {
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  padding: 10px 12px;
  font-size: 14px;
  transition: all 0.2s ease;
  background: #fff;
}

.filters-field input:focus,
.filters-field select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.filters-bot-field {
  position: relative;
}

.filters-bot-field input {
  padding-right: 38px;
}

.filters-search-icon {
  position: absolute;
  right: 12px;
  top: 39px;
  color: #94a3b8;
  pointer-events: none;
}

.filters-search-icon svg {
  width: 16px;
  height: 16px;
}

.filters-actions {
  align-self: end;
}

.filters-apply {
  width: 100%;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  border: none;
  transition: all 0.2s ease;
}

.filters-apply:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(37, 99, 235, 0.2);
}

.support-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 18px;
}

.support-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 26px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.support-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.support-card-header h3 {
  margin: 0;
}

.support-card-header .muted {
  margin: 6px 0 0;
}

.support-icon-main {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #eaf4ff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.support-icon-main svg {
  width: 30px;
  height: 30px;
}

.contact-info-box {
  background: #f8fbff;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #e2e8f0;
}

.contact-row:last-child {
  border-bottom: none;
}

.contact-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #eaf4ff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon svg {
  width: 24px;
  height: 24px;
}

.contact-label {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.contact-value {
  color: #2563eb;
  font-weight: 600;
}

.support-note {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  padding: 18px;
}

.support-note svg {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.support-note-title {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
}

.support-card .form-group {
  margin-bottom: 20px;
}

.support-card .form-group label {
  display: block;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.support-card .form-group input,
.support-card .form-group select,
.support-card .form-group textarea {
  width: 100%;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 15px;
  background: #fff;
  color: #0f172a;
}

.support-card .form-group textarea {
  min-height: 130px;
  resize: vertical;
}

.support-card .form-group input:focus,
.support-card .form-group select:focus,
.support-card .form-group textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.support-form-group-search {
  position: relative;
}

.support-submit {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
  transition: all 0.2s ease;
}

.support-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.3);
}

.support-submit svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
}

.support-status {
  display: none;
}

@media (max-width: 720px) {
  .navbar {
    padding: 12px 18px;
  }
  .page-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .horizontal {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 900px) {
  .filters-grid {
    grid-template-columns: 1fr;
  }

  .filters-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .filters-actions .filters-apply {
    width: 100%;
  }

  .support-grid {
    grid-template-columns: 1fr;
  }
}

/* Authenticated layout with sidebar */
.layout {
  min-height: 100vh;
  display: block;
  background: var(--bg);
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  gap: 18px;
  box-shadow: var(--shadow-soft);
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 600;
  color: #0f172a;
}

.sidebar-brand-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 8px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 600;
  font-size: 16px;
  transition: background 120ms ease, color 120ms ease, transform 120ms ease;
}

.side-link:hover {
  background: #f3f4f6;
  color: var(--text);
}

.side-link.active {
  background: #e0f2fe;
  color: var(--accent-strong);
}

.side-link.side-link--loading {
  pointer-events: none;
  opacity: 0.6;
}

.side-link svg {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
}

.side-link-label {
  line-height: 1.2;
  white-space: nowrap;
  min-width: 0;
}

.side-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

.main-area {
  margin-left: 240px;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

.main-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--surface);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.main-header .user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #f9fafb;
  border: 1px solid var(--border);
  color: #64748b;
  font-weight: 600;
}

.main-header .user-icon,
.main-header .logout-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  color: #64748b;
}

.main-header .user-name {
  color: #334155;
  line-height: 1;
}

.main-header .chips {
  align-items: center;
}

.main-header .header-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 36px;
  padding: 0;
  border-radius: 12px;
  background: #e5e7eb;
  transition: background 140ms ease;
}

.main-header .header-logout:hover {
  background: #d1d5db;
}

.main-content {
  padding: 28px 28px 40px;
}

.clients-summary-grid {
  grid-template-columns: minmax(0, 1fr);
}

.clients-summary-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 110px;
  overflow: hidden;
}

.clients-summary-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 3px;
  border-radius: 999px;
  background: #0ea5e9;
}

.clients-summary-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: #e0f2fe;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.clients-summary-icon svg {
  width: 28px;
  height: 28px;
}

.clients-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.clients-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.clients-search-wrap {
  min-width: 240px;
}

.clients-search-wrap input {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 1px solid #dbe3ef;
  background: #fff;
  padding: 0 12px;
  font-size: 14px;
  color: #0f172a;
}

.clients-search-wrap input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.clients-table {
  table-layout: fixed;
  min-width: 680px;
}

.clients-table th:nth-child(1),
.clients-table td:nth-child(1) {
  width: 180px;
}

.clients-table th:nth-child(2),
.clients-table td:nth-child(2) {
  width: 52%;
}

.clients-table th:nth-child(3),
.clients-table td:nth-child(3) {
  width: 260px;
}

.clients-cuit-cell {
  font-weight: 650;
  color: #0f172a;
  white-space: nowrap;
}

.clients-name-cell,
.clients-category-cell {
  color: #0f172a;
}

.clients-name-main {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.clients-cell-secondary {
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.clients-sync-error {
  margin-top: 6px;
  font-size: 11px;
  padding: 4px 8px;
}

.client-row-clickable {
  cursor: pointer;
}

.client-row-clickable:focus {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: -2px;
}

.client-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.42);
  opacity: 0;
  transition: opacity 180ms ease;
}

.client-drawer-backdrop[hidden],
.client-drawer[hidden] {
  display: none;
}

.client-drawer-backdrop.is-open {
  opacity: 1;
}

.client-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 90;
  width: min(500px, calc(100vw - 28px));
  background: #fff;
  border-left: 1px solid #e2e8f0;
  box-shadow: -18px 0 45px rgba(15, 23, 42, 0.18);
  transform: translateX(104%);
  transition: transform 180ms ease;
  display: flex;
  flex-direction: column;
}

.client-drawer.is-open {
  transform: translateX(0);
}

.client-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  border-bottom: 1px solid #e2e8f0;
}

.client-drawer-cuit {
  margin: 0 0 6px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.client-drawer-header h2 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.client-drawer-close {
  width: 36px;
  height: 36px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #fff;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
}

.client-drawer-close:hover {
  background: #f8fafc;
  color: #0f172a;
}

.client-drawer-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.client-drawer-content {
  padding: 18px 24px 28px;
  overflow-y: auto;
}

.client-profile-section {
  padding: 16px 0;
  border-bottom: 1px solid #e2e8f0;
}

.client-profile-section:last-child {
  border-bottom: 0;
}

.client-profile-section h3 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 15px;
}

.client-profile-row {
  display: grid;
  grid-template-columns: minmax(120px, 42%) 1fr;
  gap: 12px;
  padding: 8px 0;
}

.client-profile-row span {
  color: #64748b;
  font-size: 13px;
}

.client-profile-row strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.client-profile-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.client-profile-badge.success {
  background: #ecfdf3;
  color: #15803d;
}

.client-profile-badge.error {
  background: #fef2f2;
  color: #b91c1c;
}

.client-profile-badge.neutral {
  background: #eef6ff;
  color: #1d4ed8;
}

.client-profile-empty {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
}

.client-profile-loading {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}

.client-profile-alert {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 13px;
  line-height: 1.45;
}

.client-profile-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.client-profile-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.client-profile-list {
  display: grid;
  gap: 10px;
}

.client-profile-list-item {
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.client-profile-list-item strong {
  display: block;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.35;
}

.client-profile-list-item span {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 12px;
}

.client-profile-status {
  margin-bottom: 8px;
}

.clients-profile-drawer {
  width: min(520px, calc(100vw - 28px));
  background: #f8fafc;
}

.clients-profile-drawer .client-drawer-header {
  position: sticky;
  top: 0;
  z-index: 2;
  align-items: flex-start;
  padding: 24px 24px 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-bottom: 1px solid #dbeafe;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.client-drawer-title-block {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.clients-profile-drawer .client-drawer-header h2 {
  margin: 0;
  color: #0f172a;
  font-size: 24px;
  line-height: 1.16;
  letter-spacing: 0;
}

.clients-profile-drawer .client-drawer-cuit {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  font-weight: 800;
}

.clients-profile-drawer .client-drawer-close {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #f8fafc;
}

.clients-profile-drawer .client-drawer-content {
  display: grid;
  gap: 14px;
  padding: 16px 18px 24px;
  overflow-y: auto;
}

.clients-profile-drawer .client-profile-section {
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.clients-profile-drawer .client-profile-section:last-child {
  border-bottom: 1px solid #e2e8f0;
}

.clients-profile-drawer .client-profile-section h3 {
  margin: 0 0 14px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 850;
}

.clients-profile-drawer .client-profile-summary-section {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.client-profile-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.client-profile-summary-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.client-profile-summary-item span {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
}

.client-profile-summary-item strong {
  display: block;
  margin-top: 5px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.clients-profile-drawer .client-profile-row {
  grid-template-columns: minmax(120px, 38%) 1fr;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid #f1f5f9;
}

.clients-profile-drawer .client-profile-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.clients-profile-drawer .client-profile-row:last-child {
  padding-bottom: 0;
}

.clients-profile-drawer .client-profile-row span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.clients-profile-drawer .client-profile-row strong {
  font-size: 14px;
  font-weight: 750;
}

.clients-profile-drawer .client-profile-badge {
  width: fit-content;
  min-height: 28px;
  padding: 5px 11px;
  border: 1px solid transparent;
  font-weight: 850;
}

.client-profile-badge.tax-mono {
  border-color: #bbf7d0;
  background: #ecfdf3;
  color: #15803d;
}

.client-profile-badge.tax-ri {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.client-profile-badge.pending,
.client-profile-badge.empty {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #64748b;
}

.clients-profile-drawer .client-profile-chip-list {
  gap: 9px;
}

.clients-profile-drawer .client-profile-chip {
  min-height: 30px;
  padding: 6px 11px;
  border: 1px solid #dbeafe;
  background: #f8fbff;
  color: #1e3a8a;
  font-size: 12px;
}

.clients-profile-drawer .client-profile-list {
  gap: 10px;
}

.clients-profile-drawer .client-profile-list-item {
  padding: 13px;
  border-color: #dbeafe;
  border-radius: 12px;
  background: #f8fbff;
}

.clients-profile-drawer .client-profile-list-item strong {
  font-size: 13.5px;
  font-weight: 800;
}

.client-profile-list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.client-profile-list-meta span {
  display: inline-flex;
  margin: 0;
  padding: 4px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #64748b;
  font-size: 11.5px;
  font-weight: 800;
}

.ddjj-drawer-section {
  padding: 18px 0;
}

.ddjj-drawer-section h3 {
  margin-bottom: 14px;
  font-size: 14px;
  letter-spacing: 0;
}

#ddjj-due-drawer-status .ddjj-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid rgba(100, 116, 139, 0.22);
  border-radius: 999px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  color: #475569;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.01em;
}

#ddjj-due-drawer-status .ddjj-status-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.12);
}

#ddjj-due-drawer-status .ddjj-status-badge.vencido {
  border-color: rgba(239, 68, 68, 0.22);
  background: linear-gradient(135deg, #fff1f2 0%, #fee2e2 100%);
  color: #b91c1c;
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.1);
}

#ddjj-due-drawer-status .ddjj-status-badge.vencido::before {
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

#ddjj-due-drawer-status .ddjj-status-badge.hoy {
  border-color: rgba(37, 99, 235, 0.22);
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #1d4ed8;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.1);
}

#ddjj-due-drawer-status .ddjj-status-badge.hoy::before {
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

#ddjj-due-drawer-status .ddjj-status-badge.proximo {
  border-color: rgba(245, 158, 11, 0.25);
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: #b45309;
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.1);
}

#ddjj-due-drawer-status .ddjj-status-badge.proximo::before {
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

#ddjj-due-drawer-status .ddjj-status-badge.pendiente::before {
  box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.12);
}

.ddjj-drawer-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ddjj-drawer-metric {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.ddjj-drawer-metric span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.ddjj-drawer-metric strong {
  display: block;
  margin-top: 6px;
  color: #0f172a;
  font-size: 24px;
  line-height: 1;
}

.ddjj-drawer-metric.neutral {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.ddjj-drawer-metric.success {
  background: #ecfdf3;
  border-color: #bbf7d0;
}

.ddjj-drawer-metric.danger {
  background: #fef2f2;
  border-color: #fecaca;
}

.ddjj-drawer-info-grid {
  display: grid;
  gap: 8px;
}

.ddjj-drawer-info-row {
  display: grid;
  grid-template-columns: minmax(120px, 42%) 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.ddjj-drawer-info-row span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.ddjj-drawer-info-row strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.ddjj-drawer-entry-list {
  display: grid;
  gap: 10px;
}

.ddjj-drawer-entry-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

.ddjj-drawer-entry-main {
  min-width: 0;
}

.ddjj-drawer-entry-main strong {
  display: block;
  color: #0f172a;
  font-size: 14px;
}

.ddjj-drawer-entry-main span,
.ddjj-drawer-entry-meta span {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.ddjj-drawer-entry-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.ddjj-drawer-entry-badge.missing {
  background: #fef2f2;
  color: #b91c1c;
}

.ddjj-drawer-entry-badge.presented {
  background: #ecfdf3;
  color: #15803d;
}

.ddjj-drawer-entry-meta {
  grid-column: 1 / -1;
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
}

.ddjj-drawer-entry-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.ddjj-drawer-entry-pagination > span {
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.ddjj-drawer-entry-controls {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.ddjj-drawer-entry-controls button {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #dbe3ef;
  border-radius: 9px;
  background: #fff;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ddjj-drawer-entry-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.ddjj-drawer-entry-controls .icon-arrow {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.ddjj-drawer-entry-controls strong {
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

@media (max-width: 960px) {
  .layout {
    display: block;
  }
  .sidebar {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .main-area {
    margin-left: 0;
  }
  .nav-group {
    flex-direction: row;
  }
  .main-area {
    min-height: auto;
  }
  .clients-header-row {
    flex-direction: column;
    align-items: stretch;
  }
  .clients-toolbar {
    width: 100%;
    justify-content: flex-start;
  }
  .clients-search-wrap {
    width: 100%;
    min-width: 0;
  }
  .client-drawer {
    width: min(94vw, 520px);
  }
  .ddjj-forms-drawer {
    width: 100vw;
  }
  .ddjj-forms-toolbar,
  .ddjj-forms-filters,
  .ddjj-forms-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .ddjj-forms-filters label,
  .ddjj-forms-actions .refresh-btn {
    width: 100%;
  }
  .clients-profile-drawer {
    width: 100vw;
  }
  .clients-profile-drawer .client-drawer-header {
    padding: 20px 18px 16px;
  }
  .clients-profile-drawer .client-drawer-content {
    padding: 14px;
  }
  .client-profile-summary-grid {
    grid-template-columns: 1fr;
  }
  .client-profile-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .ddjj-drawer-metrics {
    grid-template-columns: 1fr;
  }
  .ddjj-drawer-info-row,
  .ddjj-drawer-entry-card {
    grid-template-columns: 1fr;
  }
  .ddjj-drawer-entry-pagination {
    align-items: stretch;
    flex-direction: column;
  }
  .ddjj-drawer-entry-controls {
    justify-content: space-between;
  }
}

.dashboard-footer {
  margin-top: 40px;
  padding: 40px 28px 20px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}
.dashboard-footer .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px;
}
.dashboard-footer .footer-col h4 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}
.dashboard-footer .footer-col p,
.dashboard-footer .footer-col a {
  margin: 0 0 8px;
  font-size: 14px;
  color: #64748b;
  text-decoration: none;
}
.dashboard-footer svg {
  fill: currentColor;
}
.dashboard-footer .footer-col a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s ease;
}
.dashboard-footer .footer-col a:hover {
  color: #2563eb;
}
.dashboard-footer .footer-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.dashboard-footer .footer-row svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: #64748b;
  transition: color 0.2s ease;
}
.dashboard-footer .footer-hours {
  display: flex;
  flex-direction: column;
}
.dashboard-footer .footer-hours .footer-row {
  display: grid;
  grid-template-columns: 22px auto;
  align-items: center;
  column-gap: 8px;
  margin-bottom: 10px;
  color: #64748b;
  font-size: 14px;
}
.dashboard-footer .footer-hours .footer-row:last-child {
  margin-bottom: 0;
}
.dashboard-footer .footer-hours .footer-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #64748b;
  justify-self: center;
}
.dashboard-footer .footer-hours .footer-icon-fill {
  fill: currentColor;
}
.dashboard-footer .footer-hours .footer-icon-calendar {
  width: 22px;
  height: 22px;
}
.dashboard-footer .footer-hours .footer-icon-stroke {
  fill: none;
  stroke: currentColor;
}
.dashboard-footer .footer-col a.footer-row:hover svg {
  color: #2563eb;
}
.dashboard-footer .footer-socials {
  display: flex;
  align-items: center;
  gap: 12px;
}
.dashboard-footer .footer-socials a {
  margin: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: color 0.2s ease, background 0.2s ease;
}
.dashboard-footer .footer-socials a:hover {
  color: #2563eb;
  background: #eef2ff;
}
.dashboard-footer .footer-socials svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: currentColor;
}
.dashboard-footer .footer-copy {
  max-width: 1200px;
  margin: 18px auto 0;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
  font-size: 13px;
  color: #64748b;
  text-align: center;
}
@media (max-width: 768px) {
  .dashboard-footer .footer-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  .dashboard-footer {
    padding: 34px 20px 18px;
  }
  .dashboard-footer .footer-container {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

/* Responsive hardening */
img,
svg,
video,
canvas {
  max-width: 100%;
}

button,
input,
select,
textarea {
  max-width: 100%;
}

.layout,
.main-area,
.main-content,
.content,
.card,
.filters-card,
.support-card,
.table-scroll,
.ddjj-day-detail-table-wrap,
.ddjj-month-card,
.client-drawer {
  min-width: 0;
}

.table-scroll,
.ddjj-day-detail-table-wrap {
  -webkit-overflow-scrolling: touch;
}

.client-drawer-backdrop {
  z-index: 1100;
}

.client-drawer {
  z-index: 1110;
}

.table th,
.table td {
  overflow-wrap: normal;
}

.table th:first-child,
.table td:first-child,
.clients-cuit-cell,
.ddjj-day-detail-table th,
.ddjj-day-detail-table td {
  white-space: nowrap;
}

.filters-field input,
.filters-field select,
.support-card .form-group input,
.support-card .form-group select,
.support-card .form-group textarea {
  width: 100%;
}

@media (max-width: 1200px) {
  .main-content {
    padding: 24px 24px 36px;
  }

  .grid,
  .ddjj-month-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .clients-summary-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .filters-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ddjj-month-controls {
    margin-right: 0;
  }
}

@media (max-width: 900px) {
  body {
    overflow-x: hidden;
  }

  .sidebar {
    max-width: 100vw;
    padding: 12px 16px;
  }

  .sidebar .brand {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .nav-group {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .side-link {
    flex: 0 0 auto;
    font-size: 14px;
    padding: 8px 10px;
  }

  .main-header {
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 18px;
  }

  .main-header .chips {
    min-width: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .main-header .user {
    min-width: 0;
  }

  .main-header .user-name {
    min-width: 0;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .page-title,
  .clients-header-row,
  .filters-header,
  .ddjj-section-header {
    flex-wrap: wrap;
  }

  .filters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters-actions {
    align-self: end;
  }

  .history-table,
  [data-dashboard] .main-content .table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .history-table thead,
  .history-table tbody,
  [data-dashboard] .main-content .table thead,
  [data-dashboard] .main-content .table tbody {
    display: table;
    width: 100%;
    min-width: 820px;
  }

  [data-dashboard] .error-detail-card .table thead,
  [data-dashboard] .error-detail-card .table tbody {
    min-width: 540px;
  }

  .table-footer {
    gap: 12px;
  }

  .pagination-wrapper {
    min-width: 0;
  }

  .page-numbers {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .ddjj-month-header {
    gap: 18px;
  }

  .ddjj-detail-summary-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .support-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .navbar {
    flex-wrap: wrap;
    padding: 12px 16px;
  }

  .nav-links {
    width: 100%;
  }

  .content,
  .main-content {
    padding: 20px 16px 32px;
  }

  .sidebar {
    gap: 10px;
    padding: 10px 12px;
  }

  .sidebar .brand {
    font-size: 15px;
  }

  .sidebar-brand-logo {
    width: 24px;
    height: 24px;
  }

  .side-link {
    gap: 6px;
    font-size: 13px;
    padding: 8px;
  }

  .side-link svg {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
  }

  .side-footer {
    display: none;
  }

  .main-header {
    align-items: stretch;
  }

  .main-header .chips {
    width: 100%;
    justify-content: flex-start;
  }

  .main-header .user-name {
    max-width: 180px;
  }

  .page-title,
  .clients-header-row,
  .filters-header,
  .ddjj-day-detail-header,
  .ddjj-month-header {
    flex-direction: column;
    align-items: stretch;
  }

  .page-title .refresh-btn,
  .ddjj-page-actions,
  .ddjj-page-actions .refresh-btn,
  .clients-toolbar .refresh-btn {
    width: 100%;
  }

  .grid,
  .summary-grid,
  .ddjj-month-summary,
  #catalog-grid,
  .filters-grid,
  .client-profile-summary-grid,
  .ddjj-detail-summary-cards,
  .ddjj-drawer-metrics {
    grid-template-columns: 1fr !important;
  }

  .card,
  .filters-card,
  .support-card {
    padding: 16px;
    border-radius: 14px;
  }

  .summary-card,
  .ddjj-summary-card,
  .clients-summary-card {
    align-items: flex-start;
  }

  .summary-icon,
  .ddjj-summary-icon,
  .clients-summary-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 14px;
  }

  .summary-content .value,
  .stat .value {
    font-size: 22px;
  }

  .filters-header-main,
  .support-card-header,
  .contact-row,
  .support-note {
    align-items: flex-start;
  }

  .filters-reset,
  .clear-filters-btn,
  .filters-actions .filters-apply,
  .btn-apply-filters,
  .export-button {
    width: 100%;
    justify-content: center;
  }

  .table-footer,
  .pagination-wrapper,
  .rows-per-page {
    width: 100%;
  }

  .rows-per-page {
    justify-content: space-between;
  }

  .pagination-wrapper {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination {
    width: 100%;
    justify-content: space-between;
  }

  .ddjj-calendar-section-header {
    gap: 12px;
  }

  .ddjj-calendar-section-icon {
    width: 52px;
    height: 52px;
    margin-top: 0;
    border-radius: 16px;
  }

  .ddjj-calendar-section-icon svg {
    width: 28px;
    height: 28px;
  }

  .ddjj-calendar-section-copy {
    flex-basis: calc(100% - 64px);
  }

  .ddjj-quick-select {
    flex-basis: 100%;
    width: 100%;
  }

  .calendar-toolbar {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .calendar-quick-actions {
    width: 100%;
    justify-self: stretch;
  }

  .calendar-cuit-filter {
    width: 100%;
    justify-self: stretch;
    justify-content: flex-end;
  }

  .calendar-filters-group {
    width: 100%;
    justify-self: stretch;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .calendar-form-filter {
    width: min(220px, 100%);
    justify-self: stretch;
  }

  .calendar-status-filter {
    width: min(220px, 100%);
    justify-self: stretch;
  }

  .calendar-cuit-filter-row,
  .calendar-cuit-input-wrap,
  .calendar-form-filter-row,
  .calendar-status-filter-row {
    flex: 1 1 auto;
    width: 100%;
  }

  .ddjj-quick-select button {
    flex: 1 1 calc(50% - 8px);
  }

  .ddjj-month-controls {
    gap: 10px;
    margin: 0;
  }

  .ddjj-month-controls strong {
    font-size: 18px;
  }

  .ddjj-month-controls .pagination-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 12px;
  }

  .ddjj-weekdays,
  .ddjj-month-calendar {
    min-width: 640px;
  }

  .ddjj-month-day {
    min-height: 92px;
    padding: 6px;
  }

  .ddjj-month-event {
    padding: 4px 5px;
    font-size: 10px;
  }

  .ddjj-month-event strong {
    font-size: 10.5px;
  }

  .ddjj-day-detail-heading {
    min-width: 0;
  }

  .ddjj-day-detail-heading-icon {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .ddjj-day-detail-filters {
    padding: 10px;
  }

  .client-drawer {
    width: 100vw !important;
    max-width: none;
    border-left: 0;
  }

  .client-drawer-header {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 18px 16px;
    background: #fff;
  }

  .client-drawer-content {
    padding: 14px 16px 22px;
  }

  .clients-profile-drawer .client-drawer-content {
    padding: 14px 12px 22px;
  }

  .client-profile-row,
  .clients-profile-drawer .client-profile-row,
  .ddjj-drawer-info-row,
  .ddjj-drawer-entry-card {
    grid-template-columns: 1fr;
  }

  .dashboard-footer {
    padding: 32px 16px 18px;
  }
}

@media (max-width: 420px) {
  .content,
  .main-content {
    padding: 16px 12px 28px;
  }

  .main-header .user-name {
    max-width: 140px;
  }

  .page-title h1 {
    font-size: 23px;
  }

  .card,
  .filters-card,
  .support-card {
    padding: 14px;
  }

  .ddjj-quick-select button {
    flex-basis: 100%;
  }

  .calendar-cuit-filter {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .calendar-filters-group {
    justify-content: stretch;
  }

  .calendar-cuit-filter-row {
    flex-basis: auto;
  }

  .calendar-form-filter {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
    width: 100%;
  }

  .calendar-status-filter {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
    width: 100%;
  }

  .calendar-form-filter-row {
    flex-basis: auto;
    width: 100%;
  }

  .calendar-status-filter-row {
    flex-basis: auto;
    width: 100%;
  }

  .ddjj-weekdays,
  .ddjj-month-calendar {
    min-width: 600px;
  }

  .rows-per-page {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .rows-label {
    flex: 1 1 auto;
  }

  .page-number,
  .pagination-btn {
    min-width: 34px;
    padding: 0 10px;
  }
}

/* Public pages responsive layer */
.app-shell > .navbar,
.app-shell > .content,
.app-shell .hero,
.app-shell .hero-visual,
.app-shell .section,
.app-shell .section-header,
.app-shell .feature-grid,
.app-shell .contact-grid,
.app-shell .product-card,
.app-shell footer,
.app-shell .chips,
.app-shell .nav-links,
.app-shell .nav-actions {
  min-width: 0;
}

.app-shell img,
.app-shell iframe {
  max-width: 100%;
}

.app-shell iframe {
  display: block;
}

.app-shell form .form-group input,
.app-shell form .form-group select,
.app-shell form .form-group textarea {
  width: 100%;
}

.app-shell .hero h1,
.app-shell .section-header h2 {
  overflow-wrap: anywhere;
}

.app-shell .pill,
.app-shell .btn-login,
.app-shell .nav-link,
.app-shell .dropdown-toggle {
  text-align: center;
}

@media (max-width: 1200px) {
  .app-shell > .content {
    max-width: 1040px;
  }

  .app-shell .hero {
    gap: 18px;
  }
}

@media (max-width: 900px) {
  .app-shell > .navbar {
    align-items: flex-start;
    gap: 12px;
    padding: 14px 20px;
  }

  .app-shell > .navbar .brand {
    flex: 0 0 auto;
  }

  .app-shell > .navbar .nav-actions {
    margin-left: auto;
  }

  .app-shell > .navbar .nav-links {
    order: 3;
    width: 100%;
    gap: 8px;
  }

  .app-shell > .content {
    padding: 28px 24px 40px;
  }

  .app-shell .hero {
    grid-template-columns: minmax(0, 1fr) !important;
    padding: 28px !important;
  }

  .app-shell .hero h1 {
    font-size: clamp(25px, 4.6vw, 32px) !important;
    line-height: 1.15;
  }

  .app-shell .hero .card img {
    max-height: 360px;
    object-fit: cover;
  }

  .app-shell .section {
    margin: 40px 0 !important;
  }

  .app-shell .section-header {
    align-items: flex-start !important;
    flex-direction: column;
  }

  .app-shell .feature-grid,
  .app-shell .contact-grid,
  .app-shell .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .app-shell .content > .section > .card[style*="grid-template-columns"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .app-shell .dropdown-menu {
    max-width: calc(100vw - 40px);
  }
}

@media (max-width: 640px) {
  .app-shell > .navbar {
    padding: 12px 16px;
  }

  .app-shell > .navbar .brand-logo {
    width: 30px;
    height: 30px;
  }

  .app-shell > .navbar .nav-links {
    flex-wrap: wrap;
  }

  .app-shell > .navbar .nav-link,
  .app-shell > .navbar .dropdown-toggle {
    padding: 7px 10px;
    font-size: 14px;
  }

  .app-shell > .content {
    padding: 22px 16px 34px;
  }

  .app-shell .hero {
    padding: 22px !important;
    border-radius: 16px !important;
  }

  .app-shell .hero h1 {
    font-size: clamp(23px, 7vw, 28px) !important;
    letter-spacing: 0 !important;
  }

  .app-shell .hero-visual {
    padding: 18px !important;
  }

  .app-shell .hero-visual .grid,
  .app-shell .feature-grid,
  .app-shell .contact-grid,
  .app-shell .grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .app-shell .content > .section > .card[style*="grid-template-columns"],
  .app-shell .hero .card[style*="grid-template-columns"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .app-shell .card {
    padding: 16px;
  }

  .app-shell .product-card img {
    max-height: 260px;
  }

  .app-shell .chips,
  .app-shell .cta-row {
    width: 100%;
  }

  .app-shell .chips .pill,
  .app-shell .cta-row .pill,
  .app-shell form .pill.primary {
    justify-content: center;
  }

  .app-shell .dropdown-menu {
    left: 0;
    min-width: min(220px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
  }

  .app-shell footer {
    margin: 44px 0 18px !important;
  }

  .app-shell footer .chips {
    justify-content: stretch !important;
  }

  .app-shell footer .chips .pill {
    flex: 1 1 100%;
  }
}

@media (max-width: 420px) {
  .app-shell > .navbar {
    align-items: stretch;
  }

  .app-shell > .navbar .brand,
  .app-shell > .navbar .nav-actions {
    width: auto;
  }

  .app-shell > .navbar .nav-actions {
    margin-left: 0;
    width: 100%;
  }

  .app-shell > .navbar .btn-login {
    width: 100%;
  }

  .app-shell > .content {
    padding: 18px 12px 30px;
  }

  .app-shell .hero {
    padding: 18px !important;
    gap: 16px !important;
  }

  .app-shell .hero h1 {
    font-size: 23px !important;
  }

  .app-shell .badge {
    max-width: 100%;
    white-space: normal;
  }

  .app-shell .card {
    padding: 14px;
  }

  .app-shell .pill,
  .app-shell .btn-login {
    width: 100%;
    justify-content: center;
    white-space: normal;
  }

  .app-shell .nav-link,
  .app-shell .dropdown-toggle {
    width: auto;
  }
}

/* Presentaciones DDJJ responsive layer */
[data-ddjj],
[data-ddjj] .main-content,
[data-ddjj] .content,
[data-ddjj] .page-title,
[data-ddjj] .ddjj-month-card,
[data-ddjj] .ddjj-day-detail-card,
[data-ddjj] .ddjj-calendar-section-header,
[data-ddjj] .calendar-toolbar,
[data-ddjj] .calendar-filters-group,
[data-ddjj] .ddjj-day-detail-header,
[data-ddjj] .ddjj-day-detail-content {
  min-width: 0;
}

[data-ddjj] .ddjj-day-detail-card {
  max-width: 100%;
  overflow: hidden;
}

[data-ddjj] .ddjj-month-card {
  max-width: 100%;
  overflow-x: clip;
  overflow-y: visible;
}

[data-ddjj] .ddjj-day-detail-table-wrap,
.ddjj-forms-table-wrap {
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

[data-ddjj] .ddjj-weekdays,
[data-ddjj] .ddjj-month-calendar {
  width: 100%;
  max-width: 100%;
}

[data-ddjj] .ddjj-month-day,
[data-ddjj] .ddjj-month-event {
  min-width: 0;
  box-sizing: border-box;
}

@media (max-width: 1400px) {
  [data-ddjj] .calendar-toolbar {
    align-items: stretch;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  [data-ddjj] .ddjj-quick-select,
  [data-ddjj] .calendar-quick-actions {
    flex: 1 1 100%;
    flex-wrap: wrap;
  }

  [data-ddjj] .calendar-filters-group {
    flex: 1 1 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  [data-ddjj] .calendar-cuit-filter {
    flex: 1 1 320px;
    width: auto;
  }

  [data-ddjj] .calendar-form-filter,
  [data-ddjj] .calendar-status-filter {
    flex: 1 1 180px;
    width: auto;
  }

  [data-ddjj] .calendar-cuit-filter-row,
  [data-ddjj] .calendar-form-filter-row,
  [data-ddjj] .calendar-status-filter-row {
    width: 100%;
  }

  [data-ddjj] .ddjj-detail-summary-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  [data-ddjj] .page-title {
    align-items: stretch;
  }

  [data-ddjj] .ddjj-page-actions {
    justify-content: flex-start;
  }

  [data-ddjj] .ddjj-month-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  [data-ddjj] .ddjj-calendar-section-copy {
    flex: 1 1 calc(100% - 70px);
  }

  [data-ddjj] .calendar-cuit-filter,
  [data-ddjj] .calendar-form-filter,
  [data-ddjj] .calendar-status-filter,
  [data-ddjj] .calendar-cuit-filter-row,
  [data-ddjj] .calendar-form-filter-row,
  [data-ddjj] .calendar-status-filter-row {
    min-width: 0;
  }

  [data-ddjj] .calendar-cuit-filter {
    flex-basis: 100%;
  }

  [data-ddjj] .calendar-form-filter,
  [data-ddjj] .calendar-status-filter {
    flex-basis: calc(50% - 6px);
  }

  [data-ddjj] .ddjj-day-detail-header {
    align-items: stretch;
  }

  [data-ddjj] .detail-filters-left {
    flex: 1 1 auto;
  }

  [data-ddjj] .ddjj-day-detail-filters label {
    flex: 1 1 180px;
    min-width: 0;
  }

  .client-drawer.ddjj-forms-drawer {
    width: 100vw;
    max-width: none;
  }

  .ddjj-forms-toolbar {
    overflow-x: visible;
  }
}

@media (max-width: 760px) {
  [data-ddjj] .ddjj-month-card {
    overflow-x: clip;
    overflow-y: visible;
  }

  [data-ddjj] .ddjj-month-header {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    overflow: visible;
  }

  [data-ddjj] .ddjj-calendar-section-header {
    order: 1;
  }

  [data-ddjj] .ddjj-month-controls {
    order: 2;
  }

  [data-ddjj] .calendar-toolbar {
    order: 3;
    display: flex;
    width: 100%;
    margin: 0 0 14px;
    overflow: visible;
  }

  [data-ddjj] .ddjj-weekdays,
  [data-ddjj] .ddjj-month-calendar {
    min-width: 0;
    gap: 4px;
  }

  [data-ddjj] .ddjj-weekdays span {
    font-size: 10px;
  }

  [data-ddjj] .ddjj-month-day {
    min-height: 86px;
    padding: 5px;
    border-radius: 8px;
  }

  [data-ddjj] .ddjj-month-day-number {
    width: 21px;
    height: 21px;
    font-size: 11px;
  }

  [data-ddjj] .ddjj-holiday-badge {
    max-width: 100%;
    padding: 2px 5px;
    font-size: 9px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  [data-ddjj] .ddjj-month-events {
    gap: 3px;
    margin-top: 4px;
  }

  [data-ddjj] .ddjj-month-event {
    padding: 4px;
    border-radius: 7px;
    font-size: 9.5px;
    line-height: 1.15;
  }

  [data-ddjj] .ddjj-month-event strong,
  [data-ddjj] .ddjj-month-event span {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  [data-ddjj] .ddjj-month-event span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

@media (max-width: 640px) {
  [data-ddjj] .ddjj-page-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  [data-ddjj] .ddjj-summary-card {
    min-height: 0;
    padding: 14px;
    gap: 12px;
  }

  [data-ddjj] .ddjj-summary-content .label,
  [data-ddjj] .ddjj-summary-content .muted {
    line-height: 1.25;
  }

  [data-ddjj] .calendar-toolbar {
    gap: 12px;
    margin-top: 0;
    margin-bottom: 14px;
  }

  [data-ddjj] .ddjj-quick-select,
  [data-ddjj] .calendar-quick-actions {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    margin: 0;
  }

  [data-ddjj] .ddjj-quick-select button {
    min-height: 42px;
    padding: 0 10px;
    font-size: 12.5px;
  }

  [data-ddjj] .calendar-filters-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    gap: 10px;
  }

  [data-ddjj] .calendar-cuit-filter,
  [data-ddjj] .calendar-form-filter,
  [data-ddjj] .calendar-status-filter {
    width: 100%;
  }

  [data-ddjj] .calendar-cuit-filter-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  [data-ddjj] .calendar-clear-cuit-button,
  [data-ddjj] .calendar-form-filter select,
  [data-ddjj] .calendar-status-filter select,
  [data-ddjj] .calendar-cuit-filter input {
    width: 100%;
  }

  [data-ddjj] .ddjj-month-controls {
    width: 100%;
  }

  [data-ddjj] .ddjj-month-controls strong {
    font-size: 16px;
  }

  [data-ddjj] .ddjj-day-detail-heading {
    align-items: flex-start;
  }

  [data-ddjj] .ddjj-day-detail-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  [data-ddjj] .detail-filters-left,
  [data-ddjj] .detail-filters-right {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  [data-ddjj] .ddjj-day-detail-table {
    min-width: 860px;
  }

  .client-drawer {
    width: 100vw !important;
    max-width: none;
  }

  .client-drawer-header {
    gap: 12px;
  }

  .client-drawer-header h2 {
    font-size: 19px;
  }

  .ddjj-drawer-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px;
  }

  .ddjj-drawer-metric {
    padding: 10px;
  }

  .ddjj-drawer-metric span {
    font-size: 10.5px;
    line-height: 1.2;
  }

  .ddjj-drawer-metric strong {
    font-size: 20px;
  }

  .ddjj-forms-drawer .client-drawer-header {
    padding: 16px 14px;
  }

  .ddjj-forms-header-main {
    gap: 10px;
  }

  .ddjj-forms-header-icon {
    width: 46px;
    height: 46px;
  }

  .ddjj-forms-header-icon svg {
    width: 26px;
    height: 26px;
  }

  .ddjj-forms-toolbar {
    align-items: stretch;
    flex-direction: column;
    padding: 12px;
  }

  .ddjj-forms-filters,
  .ddjj-forms-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .ddjj-forms-filters label,
  .ddjj-forms-filters input,
  .ddjj-forms-filters select,
  .ddjj-forms-actions .refresh-btn,
  .ddjj-forms-pending-count {
    width: 100%;
  }

  .ddjj-forms-pending-count {
    justify-content: center;
  }

  .ddjj-forms-table-wrap {
    --cuit-col-width: 168px;
    max-height: calc(100dvh - 310px);
    border-radius: 12px;
  }

  .ddjj-forms-table {
    width: max-content;
    min-width: 620px;
    font-size: 12px;
  }

  .ddjj-forms-table th,
  .ddjj-forms-table td {
    padding: 9px 8px;
  }

  .ddjj-matrix-form-col {
    min-width: 72px;
    max-width: 78px;
  }

  .ddjj-matrix-toggle {
    width: 30px;
    height: 30px;
  }
}

@media (max-width: 480px) {
  [data-ddjj] .ddjj-month-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  [data-ddjj] .ddjj-summary-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }

  [data-ddjj] .ddjj-summary-icon svg {
    width: 24px;
    height: 24px;
  }

  [data-ddjj] .ddjj-detail-summary-card {
    padding: 11px;
  }

  [data-ddjj] .ddjj-detail-summary-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  [data-ddjj] .ddjj-month-day {
    min-height: 78px;
    padding: 4px;
  }

  [data-ddjj] .ddjj-month-event {
    padding: 3px;
    font-size: 9px;
  }

  [data-ddjj] .ddjj-month-event strong {
    font-size: 9.5px;
  }

  [data-ddjj] .ddjj-month-event span {
    -webkit-line-clamp: 1;
  }

  [data-ddjj] .ddjj-day-detail-table {
    min-width: 780px;
  }

  .ddjj-drawer-metrics {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .ddjj-drawer-entry-pagination {
    align-items: stretch;
  }

  .ddjj-drawer-entry-controls {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 380px) {
  [data-ddjj] .main-content {
    padding-left: 10px;
    padding-right: 10px;
  }

  [data-ddjj] .ddjj-month-card,
  [data-ddjj] .ddjj-day-detail-card {
    padding-left: 10px;
    padding-right: 10px;
  }

  [data-ddjj] .ddjj-weekdays,
  [data-ddjj] .ddjj-month-calendar {
    gap: 3px;
  }

  [data-ddjj] .ddjj-month-day {
    min-height: 72px;
    border-radius: 7px;
  }

  [data-ddjj] .ddjj-month-day-number {
    width: 19px;
    height: 19px;
    font-size: 10px;
  }

  [data-ddjj] .ddjj-month-event {
    font-size: 8.5px;
  }
}
