:root {
  --brand-primary: #1f529e;
  --brand-primary-dark: #173d75;
  --brand-accent: #a25281;
  --brand-light: #f4f7ff;
  --brand-gradient: radial-gradient(circle at top left, #f0f5ff, #fef6fb 55%, #fff);
  --glass-bg: rgba(255, 255, 255, 0.92);
  --glass-border: rgba(31, 82, 158, 0.08);
  --text-strong: #1f2a44;
  --text-muted: #6b7280;
  --chip-bg: rgba(31, 82, 158, 0.12);
  --chip-text: #1f529e;
  --accent: #4f7fe8;
  --accent-2: #a25281;
  --accent-3: #16a34a;
  --success: #16a34a;
  --warning: #f97316;
  --elevated-shadow: 0 30px 60px rgba(15, 23, 42, 0.08);
}

.admin-page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--white, #ffffff);
}

.admin-dashboard {
  font-family: "Poppins", sans-serif;
  min-height: 100vh;
  padding: 0;
  color: var(--text-strong);
  flex: 1;
}

.admin-shell {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.admin-content {
  padding: clamp(1.25rem, 4vw, 3rem) clamp(1rem, 4vw, 3.5rem);
  padding-top: calc(var(--navbar-height, 72px) + 1.5rem);
}

.glass-panel {
  background: var(--white, #ffffff);
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 12px;
  padding: clamp(1.25rem, 2vw, 1.75rem);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}



/* Admin Navbar */
.admin-navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--white, #ffffff);
  border-bottom: 1px solid var(--gray-200, #e5e7eb);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  margin-bottom: 0;
  border-radius: 0;
}

.admin-navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  padding: 0 2rem;
  height: var(--navbar-height, 72px);
}

.admin-nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tab-card {
  padding: 0.5rem 1.25rem;
}

.tab-list {
  display: flex;
  width: 100%;
  justify-content: space-between;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
}

.tab-item {
  list-style: none;
  flex: 1;
  text-align: center;
}

.tab-item::before {
  display: none;
}

.tab-item a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding-bottom: 0.5rem;
  display: flex;
  justify-content: center;
  width: 100%;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.tab-item.active a {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-item:not(.active) a:hover {
  color: var(--text-strong);
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.toolbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-avatar {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.admin-user-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.admin-owner {
  font-size: 1.1rem;
  font-weight: 600;
}

.admin-email {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.admin-user-info .label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-dashboard .pill,
.admin-dashboard .btn {
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.admin-dashboard .btn {
  transition: all 0.25s ease;
}

.admin-dashboard .btn-ghost {
  background: rgba(31, 82, 158, 0.08);
  color: var(--brand-primary);
}

.admin-dashboard .btn-ghost:hover {
  background: rgba(31, 82, 158, 0.18);
}

.admin-dashboard .admin-btn {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1.25rem;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.5;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  margin-bottom: 0;
}

.admin-dashboard .admin-btn.secondary {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.admin-dashboard .admin-btn:hover {
  transform: translateY(-1px);
  filter: brightness(0.95);
}

.admin-dashboard .admin-btn.secondary:hover {
  background: var(--gray-50, #f9fafb);
}

.admin-dashboard .card-head .admin-btn {
  width: auto;
  min-width: unset;
  white-space: nowrap;
  align-self: center;
  margin-left: auto;
  margin-right: 0;
  transform: none;
}

.admin-dashboard .pill {
  background: var(--pill-bg);
  color: var(--pill-text);
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.admin-tab {
  border-radius: 18px;
  padding: 0.55rem 1.25rem;
  background: rgba(255, 255, 255, 0.6);
  color: var(--text-muted);
  font-weight: 500;
  border: 1px solid rgba(15, 23, 42, 0.07);
}

.admin-tab.active {
  background: var(--text-strong);
  color: white;
  border-color: var(--text-strong);
}

.admin-hero {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-title-admin {
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--primary);
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.hero-subtitle-admin {
  color: var(--text-muted);
  margin: 0.5rem 0 1rem;
  max-width: 480px;
}

.hero-chip {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--gray-300, #d1d5db);
  padding: 0.35rem 0.9rem;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.85rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: flex-end;
}

.hero-note {
  color: var(--brand-accent);
  font-weight: 600;
  margin: 0;
}

.hero-side {
  text-align: left;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hero-tabs-panel .tab-card {
  border-top: 1px solid rgba(31, 82, 158, 0.12);
  padding-top: 1rem;
  padding-bottom: 0;
  margin-top: 0.5rem;
}

.info-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.info-card {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  background: var(--glass-bg);
  border: 1px solid rgba(31, 82, 158, 0.08);
  border-radius: 12px;
  padding: 0.6rem 0.85rem;
  min-height: 95px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  box-shadow: 0 6px 12px rgba(31, 82, 158, 0.06);
}

.info-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 25px rgba(31, 82, 158, 0.12);
  border-color: rgba(31, 82, 158, 0.2);
}

.info-card-title {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.info-card-value {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
}

.info-card-change {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.analytics-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.secondary-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.card-head-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.card-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
}

.chart-canvas {
  margin-top: 1.25rem;
  border-radius: 12px;
  background: radial-gradient(circle at top, rgba(79, 127, 232, 0.15), transparent 70%);
  padding: 1rem;
}

.chart-svg {
  width: 100%;
  height: 220px;
}

.chart-legend {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-flex;
}

.legend-label {
  font-weight: 600;
}

.legend-value {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.sales-list {
  display: flex;
  flex-direction: column;
  margin-top: 1.25rem;
}

.sales-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.sales-row:last-child {
  border-bottom: none;
}

.sales-person {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sales-avatar {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(79, 127, 232, 0.18);
  color: var(--brand-primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sales-details {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.sales-email {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.sales-details address {
  font-style: normal;
}

.sales-amount {
  font-weight: 600;
  color: var(--text-strong);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.project-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.project-row:last-child {
  border-bottom: none;
}

.project-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.project-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.project-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.project-name {
  font-weight: 600;
}

.project-progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.progress-track {
  width: 140px;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.4);
  overflow: hidden;
}

.progress-value {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
}

.project-list {
  margin-top: 1rem;
}

.badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--text-strong);
}

.team-list {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.team-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.team-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.team-name {
  font-weight: 600;
}

.team-metric {
  font-weight: 600;
}

@media (min-width: 1024px) {
  .analytics-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .chart-card {
    grid-column: span 4;
  }

  .sales-card {
    grid-column: span 3;
  }

  .secondary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .navbar-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-toolbar-right {
    width: 100%;
    flex-wrap: wrap;
  }

  .admin-search {
    width: 100%;
  }
}

.admin-pill {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  padding: 0.20rem 0.75rem;
  border-radius: 6px;
  margin-left: 8px;
  font-weight: 500;
}

/* Logo SVG del navbar */
.svg-container {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

/* Texto del logo - igual al navbar general */
.app-logo {
  font-family: 'Titan One', var(--font-display), cursive;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--primary);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Botón de menú hamburguesa */
.menu-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.menu-btn:hover {
  color: var(--text-strong);
}

/* Avatar de usuario */
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Menú de usuario */
.user-menu {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 0.5rem 0;
  min-width: 160px;
  display: none;
  z-index: 100;
}

.user-menu:hover .dropdown-menu,
.dropdown-menu:focus-within {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 0.6rem 1rem;
  color: var(--text-strong);
  text-decoration: none;
  transition: background 0.2s ease;
}

.dropdown-item:hover {
  background: var(--brand-light);
}

.dropdown-item.logout {
  color: #dc2626;
}

.admin-toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

input.admin-search {
  min-width: 180px;
  height: 40px;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  background: var(--gray-50, #f9fafb);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
  margin-bottom: 0;
}

input.admin-search:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}



.section-block {
  margin-top: .5rem;
  padding: 2.25rem;
  background: var(--white, #ffffff);
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.section-title {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 600;
  color: var(--text-strong);
  margin: 0;
}

.reports-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.report-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.report-kpi-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.report-kpi-value {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
}

.report-kpi-trend {
  font-size: 0.85rem;
  color: var(--accent-2);
  font-weight: 600;
}

.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.report-table {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.report-table-body {
  display: flex;
  flex-direction: column;
}

.report-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.report-row.header {
  border-bottom: 1px solid rgba(15, 23, 42, 0.12);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.report-cell {
  flex: 1;
  font-size: 0.95rem;
  color: var(--text-strong);
}

.report-cell.primary {
  font-weight: 600;
}

.report-cell.secondary {
  color: var(--text-muted);
}

.report-cell.heading {
  font-weight: 600;
}

.report-cell.align-end {
  text-align: right;
}

.report-funnel-stage {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.tasks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.tasks-grid.single-column {
  grid-template-columns: minmax(0, 1fr);
}

.task-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.task-column-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.task-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.task-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.task-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.task-row.completed .task-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.task-row.completed .task-description,
.task-row.completed .task-meta {
  color: var(--text-muted);
  opacity: 0.7;
}

.task-owner {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.task-status-badge {
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
  background: var(--chip-bg);
  color: var(--chip-text);
}

.task-status-badge.pending {
  background: rgba(249, 115, 22, 0.15);
  color: var(--warning);
}

.task-status-badge.progress {
  background: rgba(79, 127, 232, 0.18);
  color: var(--accent);
}

.task-status-badge.done {
  background: rgba(22, 163, 74, 0.15);
  color: var(--success);
}

.task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.task-action {
  border: 1px solid rgba(31, 82, 158, 0.2);
  border-radius: 12px;
  padding: 0.35rem 0.9rem;
  background: white;
  color: var(--brand-primary);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.task-action:hover {
  background: var(--brand-primary);
  color: white;
}

.task-action.ghost {
  background: transparent;
}

.task-subtabs {
  display: flex;
  justify-content: flex-start;
}

.task-subtabs-list {
  list-style: none;
  display: flex;
  gap: 0.75rem;
  padding: 0;
  margin: 0;
}

.task-subtabs-list li,
.task-tab-item {
  list-style: none !important;
  padding-left: 0 !important;
}

.task-subtabs-list li::before,
.task-tab-item::before {
  display: none !important;
  content: none !important;
}

.task-tab-item a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  padding-bottom: 0.35rem;
  display: inline-flex;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.task-tab-item.active a {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.task-tab-item:not(.active) a:hover {
  color: var(--text-strong);
  border-bottom-color: rgba(148, 163, 184, 0.9);
}

.task-tabs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.task-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.task-add-btn {
  border-radius: 6px;
  padding: 0.5rem 1.25rem;
  min-height: 40px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.2s ease, transform 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  justify-content: center;
  line-height: 1.5;
}

.task-add-btn:hover {
  transform: translateY(-1px);
  filter: brightness(0.95);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  z-index: 1500;
  opacity: 1;
  transition: none;
  display: none;
}

.modal {
  position: fixed !important;
  inset: 0 !important;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100vw !important;
  height: 100vh !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1600;
  transition: none;
  animation: none;
  display: none;
}

.modal,
.modal-backdrop {
  transition: none;
  animation: none;
}

.modal.hidden,
.modal-backdrop.hidden {
  display: none;
  opacity: 1;
  pointer-events: none;
}

.modal.show {
  display: flex !important;
  transition: none;
  animation: none;
}

.modal-backdrop.show {
  display: block !important;
}


.admin-page-wrapper .modal-content,
.admin-page-wrapper .modal-content>* {
  animation: none !important;
  transition: none !important;
  opacity: 1 !important;
  transform: none !important;
}

.modal-content {
  width: min(520px, 100%);
  border-radius: 12px;
  position: relative;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.18);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text-strong);
  animation: none;
  transition: none;
  transform: none;
  opacity: 1;
  margin: auto;
  padding: 1.5rem;
}

.modal.show .modal-content,
#task-modal .modal-content,
#print-order-modal .modal-content,
#print-book-modal .modal-content {
  animation: none;
  transform: none;
  opacity: 1;
}

.modal-content.no-anim,
.modal-content.no-anim>* {
  animation: none !important;
  transition: none !important;
}

#task-modal .modal-content,
#task-modal .modal-content * {
  animation: none !important;
  transition: none !important;
  transform: none !important;
  opacity: 1 !important;
}

/* Anula animaciones heredadas de otros estilos (ej. book_style) en modales admin injertados en <body> */
#print-order-modal .modal-content,
#print-order-modal .modal-content>*,
#print-book-modal .modal-content,
#print-book-modal .modal-content>*,
#task-modal .modal-content,
#task-modal .modal-content * {
  animation: none !important;
  transition: none !important;
  transform: none !important;
  opacity: 1 !important;
}

/* Fuerza desactivar cualquier animación/transición residual en el modal de tareas */

#task-modal form {
  animation: none !important;
  transition: none !important;
  transform: none !important;
  opacity: 1 !important;
}

.book-modal-content .modal-footer {
  margin-top: 1rem;
}

.modal-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  line-height: 1.2;
  animation: none;
  opacity: 1;
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
  display: flex;
  align-items: center;
  animation: none;
  opacity: 1;
}

.modal-title-with-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-title-logo {
  width: 22px;
  height: 22px;
  border-radius: 8px;
}

.modal-title-with-logo .modal-title {
  color: var(--primary);
}

.print-order-theme .modal-title-with-logo .modal-title {
  color: var(--brand-rose);
}

.print-order-theme .modal-title-logo {
  width: 22px;
  height: 22px;
  border-radius: 8px;
}

.print-book-theme {
  position: relative;
  overflow: hidden;
}

.print-book-theme::before {
  content: "";
  position: absolute;
  inset: 0;
  left: -8px;
  width: 12px;
  background: linear-gradient(180deg, rgba(31, 82, 158, 0.18), rgba(162, 82, 129, 0.2));
  box-shadow: inset -3px 0 8px rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  pointer-events: none;
}

.print-order-shell {
  position: relative;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
}

.print-order-theme {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(248, 248, 255, 0.94));
  position: relative;
  overflow: hidden;
  box-shadow: 0 26px 56px rgba(15, 23, 42, 0.16);
  perspective: none;
  transform-style: flat;
  animation: none !important;
}

.print-order-theme::before {
  content: "";
  position: absolute;
  inset: 0;
  left: -8px;
  width: 14px;
  background: linear-gradient(180deg, rgba(31, 82, 158, 0.22), rgba(162, 82, 129, 0.24));
  box-shadow: inset -4px 0 10px rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  pointer-events: none;
}

.print-order-theme .modal-head {
  margin: 0 0 1rem;
  padding: 0;
  background: transparent;
  color: inherit;
  border-radius: 0;
}

.print-order-theme .form-label {
  color: var(--brand-primary);
}

.print-order-theme .print-items-card {
  border-color: rgba(162, 82, 129, 0.28);
  background: linear-gradient(135deg, rgba(244, 247, 255, 0.95), rgba(249, 243, 250, 0.95));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.print-order-theme #print-add-book-btn {
  background: linear-gradient(135deg, var(--brand-rose), #f78fb4);
  color: #fff;
  border: none;
  box-shadow: 0 10px 24px rgba(162, 82, 129, 0.3);
  border-radius: 14px 14px 6px 14px;
}

.print-order-theme #print-add-book-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(162, 82, 129, 0.32);
}

.print-order-theme.flip-out {
  animation: none !important;
  transform: none !important;
}

.book-modal-content {
  animation: none !important;
  transform: none !important;
  transform-style: flat;
  backface-visibility: visible;
}

.book-modal-content.flip-in {
  animation: none !important;
  transform: none !important;
}

.print-book-theme {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 244, 252, 0.96));
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.14);
}

.print-book-theme .modal-head {
  margin: 0 0 1rem;
  padding: 0;
}

.print-book-theme .modal-title-with-logo .modal-title {
  color: var(--brand-rose);
}

.print-book-theme .form-label {
  color: var(--brand-primary);
}

/* flip keyframes anulados */

/* Lomo vertical y tema para modal de tareas internas */
.task-modal-shell {
  position: relative;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
}

.task-modal-theme {
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
}



.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  width: 32px;
  border: none;
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 10px;
  padding: 0.25rem 0.45rem;
  margin-top: 0;
  animation: none;
  opacity: 1;
}

.modal-close:hover {
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-strong);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: none;
  opacity: 1;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  animation: none;
  opacity: 1;
  margin-top: 0.35rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-strong);
  text-align: left;
}

.form-input {
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  font-family: inherit;
  background: white;
  color: var(--text-strong);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 0.65rem;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(189, 61, 117, 0.1);
}

.form-input-multiline {
  min-height: 96px;
  line-height: 1.5;
  text-align: left;
  white-space: pre-wrap;
  width: 100%;
  display: block;
  resize: none;
  box-sizing: border-box;
  font-family: inherit;
}

.form-input::placeholder {
  color: var(--text-muted);
  font-family: inherit;
}

.form-input-multiline::placeholder {
  color: var(--text-muted);
  font-family: inherit;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 0.8rem;
}

.form-col-span-2 {
  grid-column: span 2;
}

.form-helper {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: 0.35rem;
}

.form-input[contenteditable="true"]::before {
  content: attr(placeholder);
  color: var(--text-muted);
}

.form-input[contenteditable="true"]:focus::before,
.form-input[contenteditable="true"]:not(:empty)::before {
  content: "";
}

.form-error {
  color: #b91c1c;
  font-weight: 600;
  font-size: 0.9rem;
  margin: -0.25rem 0 0.5rem;
}

.hidden {
  display: none !important;
}

#task-modal-container,
#print-order-modal-container,
#print-book-modal-container {
  position: absolute;
  width: 0;
  height: 0;
  overflow: visible;
  pointer-events: none;
}

.modal-content .btn {
  background: linear-gradient(135deg, var(--brand-primary), var(--accent));
  color: #fff;
}

.modal-content .btn.ghost {
  background: rgba(31, 82, 158, 0.08);
  color: var(--brand-primary);
  border: 1px solid rgba(31, 82, 158, 0.18);
}

.modal-content .capitalize {
  text-transform: capitalize;
}

.modal-content .task-add-btn {
  border-radius: 6px;
  padding: 0.6rem 1.1rem;
  border: none;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.1s ease;
}

.modal-content .task-add-btn.ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--gray-300, #d1d5db);
  box-shadow: none;
}

.modal-content .task-add-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(189, 61, 117, 0.25);
}

.modal-content .task-add-btn.ghost:hover {
  background: var(--gray-50, #f9fafb);
  color: var(--text-strong);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.task-table-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow: visible;
}

.task-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.filter-select {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.filter-select:focus {
  outline: none;
}

.filter-select:hover {}

.filter-select option {
  padding: 0.45rem 0.7rem;
  font-weight: 600;
  background: #fff;
  color: var(--text-strong);
  font-family: inherit;
  border-radius: 12px;
  margin: 3px 6px;
}

.filter-select-wrapper {
  position: relative;
  display: inline-block;
}

.filter-select-toggle {
  border: 1px solid var(--gray-300, #d1d5db);
  background: white;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  min-height: 40px;
  display: flex;
  align-items: center;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-strong);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  min-width: 150px;
  text-align: left;
  width: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b7280' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-position: calc(100% - 14px) center;
  background-size: 10px 6px;
  background-repeat: no-repeat;
}

.filter-select-toggle:hover,
.filter-select-toggle:focus {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border-color: var(--gray-400, #9ca3af);
  outline: none;
}

.filter-select-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(80%);
  background: #fff;
  border-radius: 6px;
  border: 1px solid var(--gray-200, #e5e7eb);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  padding: 6px;
  z-index: 3000;
  display: none;
  max-height: 320px;
  overflow-y: auto;
}

.filter-select-dropdown.open {
  display: block;
}

.filter-select-dropdown li {
  list-style: none;
  padding: 0.55rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text-strong);
  transition: background 0.15s ease, color 0.15s ease;
}

.filter-select-dropdown li:hover {
  background: rgba(0, 0, 0, 0.03);
}

.filter-select-dropdown li.selected {
  background: rgba(231, 230, 230, 0.696);
  color: var(--brand-accent);
}

.filter-chip {
  border: 1px solid rgba(31, 82, 158, 0.18);
  background: white;
  border-radius: 14px;
  padding: 0.55rem 0.9rem;
  font-weight: 600;
  color: var(--text-strong);
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(31, 82, 158, 0.08);
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.filter-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(31, 82, 158, 0.12);
  border-color: rgba(31, 82, 158, 0.32);
}

.task-add-btn .indicator {
  display: none;

}

.task-add-btn.is-loading .indicator {
  display: inline-flex;
}

.task-add-btn.is-loading .button-content {
  display: none;
}

.task-add-btn .btn-spinner {
  width: 16px;
  height: 16px;
}

.task-table {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: relative;
  overflow: visible;
}

.task-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  position: relative;
  z-index: 1;
}

.task-row.menu-open {
  position: relative;
  /* aseguras que el z-index aplica */
  z-index: 50;
  /* por encima del resto de filas */
}


.task-row:not(:last-child) {
  box-shadow: inset 0 -1px rgba(15, 23, 42, 0.06);
}

.task-row:hover {
  background: var(--gray-50, #f9fafb);
}

.task-checkbox-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.task-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--gray-300, #d1d5db);
  border-radius: 6px;
  background: white;
  margin: 0;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.task-checkbox:checked {
  background: var(--primary);
  border-color: var(--primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8' width='10' height='8'%3E%3Cpath fill='none' d='M9 1L3.5 6.5L1 4' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 10px;
  background-position: center;
  background-repeat: no-repeat;
}

.task-checkbox:hover {
  border-color: var(--primary);
}

.task-main {
  display: flex;
  flex-direction: column;
  gap: 0.20rem;
}

.task-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-strong);
}

.task-title-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;

}

.task-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.task-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  background: transparent;
  border: 1px solid var(--gray-300, #d1d5db);
  color: var(--text-muted);
  z-index: 2000;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.task-pill.state.pending {
  background: transparent;
  color: #f97316;
  border-color: #f97316;
}

.task-pill.state.progress {
  background: transparent;
  color: #3b82f6;
  border-color: #3b82f6;
}

.task-pill.state.done {
  background: transparent;
  color: #22c55e;
  border-color: #22c55e;
}

.task-pill.state.overdue {
  background: transparent;
  color: #ef4444;
  border-color: #ef4444;
}

.task-pill.due {
  border: 1px dashed rgba(249, 115, 22, 0.45);
  background: rgba(249, 115, 22, 0.08);
  color: var(--warning);
}

.task-pill.due.overdue {
  border-color: rgba(220, 38, 38, 0.45);
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
}


.task-row.completed .task-pill.state {
  background: rgba(22, 163, 74, 0.14);
  color: var(--success);
  border: 1px solid rgba(22, 163, 74, 0.25);
}

.task-row.completed .task-pill.due {
  border: 1px dashed rgba(22, 163, 74, 0.35);
  background: rgba(22, 163, 74, 0.1);
  color: var(--success);
}

.task-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, max-height 0.25s ease, transform 0.25s ease, margin-top 0.25s ease;
  transform: translateY(-4px);
  margin-top: 0;
  padding-top: 0;
}

.task-row.expanded .task-description {
  opacity: 1;
  max-height: 500px;
  transform: translateY(0);
  pointer-events: auto;
  margin-top: 0.3rem;
}

.task-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}

.task-meta-item {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
}

.task-row-menu {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.25rem;
  line-height: 1;
}

.task-row-menu:hover {
  background: var(--gray-100, #f3f4f6);
  color: var(--text-strong);
}

.task-row-actions-wrapper {
  position: relative;
  z-index: 1000;
}



.task-row-actions {
  position: absolute;
  right: 0;
  top: calc(100%);
  display: none;
  flex-direction: column;
  gap: 0.15rem;
  background: white;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 6px;
  padding: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 120px;
  z-index: 10000;
}

.task-row-actions.open {
  display: flex;
}

.task-row-action {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  text-align: left;
  background: transparent;
  border: none;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-strong);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  border-radius: 4px;
  margin-bottom: 0;
}

.task-row-action:hover {
  background: var(--gray-50, #f9fafb);
  color: var(--text-strong);
}

.task-row-action.danger {
  color: #dc2626;
}

.task-row-action.danger:hover {
  color: #b91c1c;
}



.notif-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.notif-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.notif-table,
.notif-list {
  display: flex;
  flex-direction: column;
}

.notif-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.notif-row:last-child {
  border-bottom: none;
}

.notif-row.header {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--text-muted);
}

.notif-row-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.notif-row-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.notif-cell {
  flex: 1;
  font-size: 0.9rem;
}

.notif-cell.heading {
  font-weight: 600;
  color: var(--text-muted);
}

.notif-cell.primary {
  font-weight: 600;
}

.notif-cell.secondary {
  color: var(--text-muted);
}

.notif-cell.align-end {
  text-align: right;
}

.notif-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.notif-action {
  border-radius: 10px;
  border: 1px solid rgba(31, 82, 158, 0.2);
  background: rgba(31, 82, 158, 0.08);
  color: var(--brand-primary-dark);
  font-size: 0.85rem;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
}

.notif-badge {
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--chip-bg);
  color: var(--chip-text);
}

.notif-badge.priority-alta {
  background: rgba(217, 70, 239, 0.2);
  color: #a21caf;
}

.notif-badge.priority-media {
  background: rgba(251, 191, 36, 0.2);
  color: #a16207;
}

.notif-badge.priority-baja {
  background: rgba(22, 163, 74, 0.15);
  color: var(--success);
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.calendar-nav-btn {
  border-radius: 12px;
  border: 1px solid rgba(31, 82, 158, 0.2);
  background: white;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--brand-primary);
}

.calendar-current {
  font-weight: 600;
  font-size: 1rem;
}

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

.calendar-day-name {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.calendar-day {
  min-height: 110px;
  border: 1px dashed rgba(31, 82, 158, 0.2);
  border-radius: 16px;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.8);
}

.calendar-day-has-event {
  border-color: var(--brand-accent);
  background: rgba(162, 82, 129, 0.08);
}

.calendar-day-number {
  font-weight: 600;
}

.calendar-events {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.calendar-event {
  font-size: 0.75rem;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  background: rgba(31, 82, 158, 0.12);
  color: var(--brand-primary-dark);
  width: fit-content;
}

.print-items-card {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px dashed rgba(31, 82, 158, 0.22);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(244, 247, 255, 0.92), rgba(248, 244, 252, 0.9));
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.print-items-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.print-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.print-item-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid rgba(31, 82, 158, 0.12);
  border-radius: 14px;
  padding: 0.75rem 0.9rem;
  background: linear-gradient(135deg, #fff, #f9f5fb);
}

.print-item-main {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.75rem;
  flex: 1;
}

.print-item-ref {
  font-weight: 700;
  color: var(--brand-primary);
}

.print-item-title {
  font-weight: 600;
  color: var(--text-strong);
}

.print-item-qty {
  font-weight: 600;
  color: var(--accent-3);
}

.print-item-files {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  grid-column: 1 / -1;
}

.print-item-file {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.print-item-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.print-item-actions .task-row-action {
  padding: 0.35rem 0.75rem;
}

.file-input {
  padding: 0.4rem 0.5rem;
  margin-bottom: 0;
}

.cover-input-wrapper {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  max-width: 280px;
  margin-left: auto;
  height: 100%;
}

.cover-file-input {
  position: absolute;
  inset: 0;
  opacity: 0 !important;
  cursor: pointer;
  width: 100%;
  height: 100%;
  z-index: 2;
  border: none;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.cover-placeholder {
  border: 1.5px dashed rgba(31, 82, 158, 0.35);
  background: rgba(244, 247, 255, 0.6);
  border-radius: 16px;
  padding: 1.2rem;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  color: var(--brand-primary);
  font-weight: 800;
  font-size: 1.8rem;
  width: 100%;
  box-sizing: border-box;
}

.cover-input-wrapper:hover .cover-placeholder,
.cover-input-wrapper:focus-within .cover-placeholder {
  border-color: var(--brand-primary);
  box-shadow: 0 8px 18px rgba(31, 82, 158, 0.14);
  background: rgba(244, 247, 255, 0.9);
}

.cover-field {
  grid-column: 2;
  grid-row: 2 / span 3;
  align-self: stretch;
}

.interior-field {
  grid-column: 1;
  grid-row: 4;
  align-items: flex-start;
  width: 100%;
  text-align: left;
}

.interior-field .form-label {
  display: block;
  width: 100%;
  text-align: left;
}

.interior-upload {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  justify-content: flex-start;
  width: 100%;
}

.interior-file-input-hidden {
  display: none;
}

.interior-upload-label {
  display: inline-flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0.65rem 1.1rem;
  border-radius: 12px;
  background: rgba(240, 244, 248, 0.9);
  border: 1px solid rgba(31, 82, 158, 0.22);
  color: var(--text-strong);
  font-weight: 600;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 8px 16px rgba(15, 23, 42, 0.08);
  transition: transform 0.12s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  min-width: 226px;
  height: auto;
}

.interior-upload-label:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 12px 22px rgba(15, 23, 42, 0.12);
  border-color: rgba(31, 82, 158, 0.32);
  background: rgba(240, 244, 248, 1);
}

.reference-field {
  grid-column: 1;
  grid-row: 2;
}

.quantity-field {
  grid-column: 1;
  grid-row: 3;
}

.file-input.cover-input:hover,
.file-input.cover-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 8px 18px rgba(31, 82, 158, 0.14);
  background: rgba(244, 247, 255, 0.9);
}

@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-col-span-2 {
    grid-column: span 1;
  }
}

@media (max-width: 768px) {
  .section-block {
    padding: 1.25rem;
  }

  .reports-grid,
  .tasks-grid,
  .notif-grid {
    grid-template-columns: 1fr;
  }

  .calendar-grid {
    gap: 0.25rem;
  }
}

/* ============================================================
   ORDERS (PEDIDOS) SECTION
   ============================================================ */

.order-table {
  display: flex;
  flex-direction: column;
  background: var(--white, #fff);
  border-radius: 12px;
  border: 1px solid var(--gray-200, #e5e7eb);
  overflow: hidden;
}

.order-header {
  display: grid;
  grid-template-columns: 100px 120px 100px 1fr 150px 80px;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  background: var(--gray-50, #f9fafb);
  border-bottom: 1px solid var(--gray-200, #e5e7eb);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.order-header-cell {
  display: flex;
  align-items: center;
}

.order-row {
  display: grid;
  grid-template-columns: 100px 120px 100px 1fr 150px 80px;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-100, #f3f4f6);
  align-items: center;
  transition: background 0.15s ease;
}

.order-row:last-child {
  border-bottom: none;
}

.order-row:hover {
  background: var(--gray-50, #f9fafb);
}

.order-cell {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-strong);
}

.order-id {
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.8rem;
  color: var(--brand-primary);
  background: var(--chip-bg);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}

.order-amount {
  font-weight: 600;
  color: var(--text-strong);
}

.order-buyer {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.order-date {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.order-empty {
  padding: 3rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Status badges for orders */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.status-badge.pending {
  background: rgba(249, 115, 22, 0.12);
  color: #ea580c;
}

.status-badge.done {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
}

.status-badge.danger {
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
}

.status-badge.neutral {
  background: var(--gray-100, #f3f4f6);
  color: var(--text-muted);
}

/* Order detail modal */
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-100, #f3f4f6);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.detail-value {
  font-size: 0.9rem;
  color: var(--text-strong);
  text-align: right;
}

.detail-value.mono {
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.8rem;
}

/* Responsive orders */
@media (max-width: 900px) {
  .order-header {
    display: none;
  }
  
  .order-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
  }
  
  .order-cell {
    width: 100%;
  }
  
  .order-cell-id {
    order: -1;
  }
  
  .order-cell-amount {
    font-size: 1.1rem;
  }
  
  .order-cell-actions {
    margin-top: 0.5rem;
  }
}