:root {
  --app-bg: #f2e5d5;
  --app-bg-gradient-start: #f7efe4;
  --app-bg-gradient-end: #ecddc8;
  --app-surface: #f3e5d3;
  --app-surface-soft: #f8edde;
  --app-surface-muted: #eadbc7;
  --app-input: #fffaf4;
  --app-input-focus: #fffdf9;
  --app-readonly: #f0e0ca;
  --app-static: #f7eee2;
  --app-table-head: #e7d6c1;
  --app-sidebar: linear-gradient(180deg, #74523b 0%, #5a3e2c 100%);
  --app-primary: #6d4a33;
  --app-primary-hover: #573926;
  --app-primary-soft: rgba(109, 74, 51, 0.12);
  --app-accent: #cda97f;
  --app-text: #513727;
  --app-text-soft: #816654;
  --app-border: rgba(94, 65, 43, 0.14);
  --app-border-strong: rgba(94, 65, 43, 0.24);
  --app-success: #198754;
  --app-warning: #b7791f;
  --app-danger: #dc3545;
  --app-info: #5f7ea0;
  --app-shadow-sm: 0 6px 16px rgba(74, 45, 24, 0.05);
  --app-shadow-md: 0 18px 44px rgba(74, 45, 24, 0.08);
  --app-font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --app-font-size-base: 1rem;
  --app-line-height-base: 1.5;
  --app-font-weight-normal: 400;
  --app-font-weight-semibold: 600;
  --app-font-weight-bold: 700;
  --app-font-weight-extra-bold: 800;
  --app-radius-sm: 12px;
  --app-radius-md: 18px;
  --app-radius-lg: 24px;
  --app-radius-pill: 999px;
  --nav-height: 78px;
  --sidebar-width: 272px;
  --sidebar-collapsed-width: 94px;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(109, 74, 51, 0.58) rgba(241, 228, 209, 0.82);
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 11px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: rgba(241, 228, 209, 0.86);
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(138, 98, 70, 0.94) 0%, rgba(109, 74, 51, 0.9) 100%);
  border-radius: 999px;
  border: 2px solid rgba(241, 228, 209, 0.92);
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(149, 107, 78, 0.98) 0%, rgba(117, 80, 56, 0.94) 100%);
}

html, body {
  min-height: 100%;
  color: var(--app-text);
  background:
    radial-gradient(circle at top right, rgba(255, 251, 245, 0.65), transparent 28%),
    linear-gradient(180deg, var(--app-bg-gradient-start) 0%, var(--app-bg-gradient-end) 100%);
}

body {
  font-family: var(--app-font-family);
  font-size: var(--app-font-size-base);
  font-weight: var(--app-font-weight-normal);
  line-height: var(--app-line-height-base);
  letter-spacing: 0.01em;
}

a {
  color: inherit;
  text-decoration: none;
}

main.main-content.layout-wrapper {
  background: transparent !important;
  margin-left: var(--sidebar-width);
  min-height: calc(100vh - var(--nav-height));
  padding: 1.75rem 1.5rem 2.5rem;
  transition: none;
}

.sidebar.collapsed ~ .main-content.layout-wrapper {
  margin-left: var(--sidebar-collapsed-width);
}

.content-shell {
  max-width: 1560px;
  margin: 0 auto;
}

.b-beige,
.beige {
  background-color: var(--app-bg) !important;
}

/* NAVBAR */
.navbar {
  min-height: var(--nav-height);
  padding: 0.85rem 1.25rem !important;
  background: rgba(247, 239, 228, 0.88) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--app-border);
}

.navbar .container-fluid {
  align-items: center;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  padding: 0 !important;
  margin: 0 !important;
}

.navbar-brand img {
  width: 52px;
  height: 52px !important;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(109, 74, 51, 0.14);
  box-shadow: var(--app-shadow-sm);
}

.navbar-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-title,
.navbar h3 {
  margin: 0 !important;
  line-height: 1.05 !important;
  font-size: 1.35rem;
  font-weight: var(--app-font-weight-extra-bold);
  color: var(--app-primary) !important;
}

.brand-subtitle {
  margin: 0;
  font-size: 0.82rem;
  color: var(--app-text-soft);
}

.vl {
  display: none;
}

.app-navbar-toggler {
  border: 1px solid var(--app-border) !important;
  border-radius: 12px;
  padding: 0.45rem 0.65rem;
  background: rgba(255, 249, 241, 0.9);
  box-shadow: none !important;
}

.app-navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(109, 74, 51, 0.14) !important;
}

.custom-mobile-menu {
  margin-top: 1rem;
}

.account-menu {
  position: relative;
}

.account-toggle {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--app-border);
  border-radius: 14px;
  background: rgba(255, 250, 244, 0.74);
  color: var(--app-text);
  box-shadow: var(--app-shadow-sm);
}

.account-toggle:hover,
.account-toggle:focus,
.account-toggle.show {
  background: var(--app-input-focus);
  color: var(--app-text);
  border-color: var(--app-border-strong);
}

.account-toggle.dropdown-toggle::after {
  display: none;
}

.account-avatar {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--app-primary);
  color: #fffaf4;
  font-size: 0.78rem;
  font-weight: var(--app-font-weight-extra-bold);
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.account-avatar-lg {
  width: 42px;
  height: 42px;
  font-size: 0.92rem;
}

.account-caret {
  margin-left: 0.15rem;
  color: var(--app-text-soft);
  font-size: 0.82rem;
  transition: transform 0.16s ease;
}

.account-toggle.show .account-caret {
  transform: rotate(180deg);
}

.account-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  line-height: 1.15;
}

.account-copy strong {
  max-width: 180px;
  overflow: hidden;
  color: var(--app-primary);
  font-size: 0.92rem;
  font-weight: var(--app-font-weight-bold);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-copy small {
  max-width: 180px;
  overflow: hidden;
  color: var(--app-text-soft);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-dropdown {
  min-width: 284px;
  padding: 0.7rem;
  background: var(--app-surface-soft);
  border: 1px solid var(--app-border);
  border-radius: 14px;
  box-shadow: var(--app-shadow-md);
}

.account-dropdown.show {
  display: block;
}

.account-dropdown-header {
  display: flex;
  align-items: center;
  gap: 0.78rem;
  padding: 0.78rem 0.85rem 0.72rem;
  border-radius: 12px;
  background: rgba(255, 250, 244, 0.66);
  border: 1px solid rgba(94, 65, 43, 0.09);
}

.account-dropdown-identity {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.account-dropdown-header strong {
  max-width: 180px;
  overflow: hidden;
  color: var(--app-primary);
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-dropdown-header small,
.account-dropdown .dropdown-header {
  max-width: 180px;
  overflow: hidden;
  color: var(--app-text-soft);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-dropdown .dropdown-header {
  padding: 0.72rem 0.85rem 0.35rem;
  font-size: 0.72rem;
  font-weight: var(--app-font-weight-extra-bold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.account-dropdown .dropdown-item {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.56rem 0.85rem;
  border-radius: 10px;
  color: var(--app-text);
  font-weight: var(--app-font-weight-semibold);
}

.account-dropdown .dropdown-item:hover,
.account-dropdown .dropdown-item:focus {
  background: var(--app-primary-soft);
  color: var(--app-primary);
}

.account-dropdown .dropdown-item.active,
.account-dropdown .dropdown-item:active {
  background: var(--app-primary-soft);
  color: var(--app-primary);
  box-shadow: inset 3px 0 0 var(--app-primary);
}

.account-dropdown .dropdown-divider {
  margin: 0.55rem 0;
  border-top-color: var(--app-border);
}

.account-dropdown form {
  margin: 0;
}

.account-logout {
  margin: 0.65rem 0 0;
  padding: 0.65rem 0 0;
  border-top: 1px solid var(--app-border);
}

.account-dropdown .account-logout-button {
  justify-content: center;
  background: rgba(220, 53, 69, 0.06);
  color: #8f2531;
  border: 1px solid rgba(220, 53, 69, 0.14);
}

.account-dropdown .account-logout-button:hover,
.account-dropdown .account-logout-button:focus {
  background: rgba(220, 53, 69, 0.12);
  border-color: rgba(220, 53, 69, 0.22);
  color: #7b1d29 !important;
}

.mobile-menu {
  width: 100%;
}

.mobile-menu-card {
  background: var(--app-surface-soft);
  border: 1px solid var(--app-border);
  border-radius: 18px;
  padding: 0.6rem;
  box-shadow: var(--app-shadow-md);
}

.mobile-menu-card .sidebar-link {
  color: var(--app-text) !important;
  background: transparent !important;
  margin-bottom: 0.28rem;
}

.mobile-menu-card .sidebar-link.active {
  background: rgba(109, 74, 51, 0.1) !important;
  color: var(--app-primary) !important;
}

.mobile-menu-card .hide-on-collapse {
  display: inline !important;
  opacity: 1 !important;
  width: auto !important;
}

/* SIDEBAR */
.sidebar {
  position: fixed;
  inset: var(--nav-height) auto 0 0;
  width: var(--sidebar-width);
  background: var(--app-sidebar);
  color: #fff;
  padding: 1rem 0.9rem 1.2rem;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 12px 0 34px rgba(52, 33, 19, 0.12);
  transition: width 0.25s ease, transform 0.25s ease;
  z-index: 1030;
  overflow-x: hidden;
  overflow-y: auto;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.3rem 0.2rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-title {
  font-size: 0.84rem;
  font-weight: var(--app-font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.75);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.sidebar.collapsed .sidebar-title {
  opacity: 0;
  transform: translateX(-8px);
  pointer-events: none;
}

.toggle-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

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

.sidebar.collapsed .toggle-btn i {
  transform: rotate(180deg);
}

.sidebar-nav {
  gap: 0.28rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  min-height: 48px;
  padding: 0.82rem 0.95rem !important;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.86) !important;
  font-weight: var(--app-font-weight-semibold);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff !important;
  transform: translateX(2px);
}

.sidebar-link.active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.sidebar-link svg {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
}

.hide-on-collapse {
  white-space: nowrap;
  transition: opacity 0.18s ease, width 0.18s ease;
}

.sidebar.collapsed .hide-on-collapse {
  opacity: 0;
  width: 0;
  overflow: hidden;
  display: inline-block;
}

.sidebar.collapsed .sidebar-link {
  justify-content: center;
  padding-inline: 0.75rem !important;
  gap: 0;
}

/* PAGE */
.app-page {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.app-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.15rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--app-border);
}

.app-page-title {
  margin: 0;
  font-size: clamp(1.75rem, 1.2rem + 1vw, 2.25rem);
  line-height: 1.05;
  font-weight: var(--app-font-weight-extra-bold);
  color: var(--app-primary);
}

.app-page-subtitle {
  margin: 0.42rem 0 0;
  color: var(--app-text-soft);
  max-width: 52rem;
}

.app-page-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* SURFACES */
.app-card {
  background: linear-gradient(180deg, var(--app-surface-soft) 0%, var(--app-surface) 100%);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-md);
  box-shadow: var(--app-shadow-md);
  padding: 1.35rem;
}

.app-card-title {
  margin: 0 0 0.9rem;
  font-size: 1.08rem;
  line-height: 1.15;
  font-weight: var(--app-font-weight-extra-bold);
  color: var(--app-primary);
}

.app-card-subtitle {
  margin: -0.12rem 0 1rem;
  color: var(--app-text-soft);
  max-width: 62rem;
}

.app-stack {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.app-panel-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
  padding: 0.35rem;
  border-radius: 999px;
  background: rgba(109, 74, 51, 0.08);
}

.app-panel-switcher .btn {
  border: 0;
  border-radius: 999px;
  min-height: 40px;
  padding-inline: 1rem;
  color: var(--app-text-soft);
  background: transparent;
  font-weight: var(--app-font-weight-semibold);
}

.app-panel-switcher .btn.is-active {
  background: #fff;
  color: var(--app-primary);
  box-shadow: 0 10px 24px rgba(109, 74, 51, 0.12);
}

.app-panel-switcher .btn[hidden] {
  display: none !important;
}

.app-readonly-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1rem;
}

.app-readonly-grid-span-2 {
  grid-column: 1 / -1;
}

.app-toggle-card {
  cursor: pointer;
}

.app-toggle-card.is-disabled {
  cursor: not-allowed;
  opacity: 0.9;
}

.app-toggle-surface:has(.form-check-input:checked) {
  background: var(--app-primary-soft);
  border-color: rgba(109, 74, 51, 0.24);
}

hr {
  border-top: 1px solid var(--app-border);
  opacity: 1;
}

/* ALERTS */
.alert {
  border: 1px solid transparent;
  border-radius: 14px;
  box-shadow: var(--app-shadow-sm);
}

.alert ul {
  padding-left: 1.1rem;
  margin-bottom: 0;
}

.alert-danger {
  background: rgba(220, 53, 69, 0.09);
  color: #7b1d29;
  border-color: rgba(220, 53, 69, 0.18);
}

.alert-warning {
  background: rgba(255, 193, 7, 0.12);
  color: #7a5800;
  border-color: rgba(255, 193, 7, 0.22);
}

.alert-success {
  background: rgba(25, 135, 84, 0.1);
  color: #11663f;
  border-color: rgba(25, 135, 84, 0.18);
}

/* BUTTONS */
.btn {
  border-radius: 12px;
  font-weight: var(--app-font-weight-semibold);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus {
  box-shadow: 0 0 0 0.2rem rgba(109, 74, 51, 0.14) !important;
}

.btn-primary {
  background-color: var(--app-primary);
  border-color: var(--app-primary);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.show > .btn-primary.dropdown-toggle,
.btn-check:checked + .btn-primary,
.btn-check:active + .btn-primary {
  background-color: var(--app-primary-hover) !important;
  border-color: var(--app-primary-hover) !important;
  color: #fff !important;
  box-shadow: none !important;
}

.btn-primary:disabled,
.btn-primary.disabled,
.btn-primary[aria-busy="true"],
.btn-save.btn-primary:disabled {
  background-color: var(--app-primary) !important;
  border-color: var(--app-primary) !important;
  color: #fff !important;
  opacity: 0.86;
  box-shadow: none !important;
  transform: none;
}

.btn-success {
  background-color: var(--app-success) !important;
  border-color: var(--app-success) !important;
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active,
.btn-success.active {
  background-color: #157347 !important;
  border-color: #157347 !important;
}

.btn-dark {
  background-color: #3d2b20 !important;
  border-color: #3d2b20 !important;
}

.btn-danger {
  background-color: var(--app-danger) !important;
  border-color: var(--app-danger) !important;
}

.btn-light {
  background: var(--app-input) !important;
  border-color: var(--app-border) !important;
  color: var(--app-text) !important;
}

.btn-back {
  background: linear-gradient(180deg, #fffaf4 0%, #f4eadc 100%) !important;
  border: 1px solid rgba(109, 74, 51, 0.36) !important;
  color: var(--app-primary) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68), 0 4px 10px rgba(62, 42, 28, 0.08);
}

.btn-back:hover,
.btn-back:focus {
  background: rgba(109, 74, 51, 0.12) !important;
  border-color: rgba(109, 74, 51, 0.46) !important;
  color: var(--app-primary-hover) !important;
  box-shadow: 0 8px 16px rgba(62, 42, 28, 0.12);
}

.btn-back i,
.btn-table-action i {
  font-size: 1.08rem;
}

.btn-table-action {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(109, 74, 51, 0.3) !important;
  background: linear-gradient(180deg, #fffaf4 0%, #f5ecdf 100%) !important;
  color: var(--app-primary-hover) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68), 0 4px 10px rgba(62, 42, 28, 0.08);
}

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

.btn-table-action:hover,
.btn-table-action:focus {
  background: rgba(109, 74, 51, 0.12) !important;
  border-color: rgba(109, 74, 51, 0.46) !important;
  color: var(--app-primary-hover) !important;
  box-shadow: 0 8px 16px rgba(62, 42, 28, 0.12);
}

.btn-table-action-danger {
  color: #9f2634 !important;
  border-color: rgba(159, 38, 52, 0.18) !important;
}

.btn-table-action-danger:hover,
.btn-table-action-danger:focus {
  background: rgba(220, 53, 69, 0.1) !important;
  border-color: rgba(220, 53, 69, 0.2) !important;
  color: #7b1d29 !important;
  box-shadow: 0 8px 16px rgba(123, 29, 41, 0.12);
}

.btn-table-action-success {
  color: #16643f !important;
  border-color: rgba(25, 135, 84, 0.22) !important;
}

.btn-table-action-success:hover,
.btn-table-action-success:focus {
  background: rgba(25, 135, 84, 0.12) !important;
  border-color: rgba(25, 135, 84, 0.28) !important;
  color: #0f5132 !important;
  box-shadow: 0 8px 16px rgba(15, 81, 50, 0.12);
}

.btn-table-action-warning {
  color: #8a5a16 !important;
  border-color: rgba(181, 124, 42, 0.24) !important;
}

.btn-table-action-warning:hover,
.btn-table-action-warning:focus {
  background: rgba(181, 124, 42, 0.13) !important;
  border-color: rgba(181, 124, 42, 0.32) !important;
  color: #6d4210 !important;
  box-shadow: 0 8px 16px rgba(109, 66, 16, 0.12);
}

.btn-save {
  min-width: 190px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* FORMS */
.form-label {
  margin-bottom: 0.45rem;
  font-weight: var(--app-font-weight-bold);
  color: var(--app-primary);
}

.form-control,
.form-select,
.bootstrap-table .search input {
  background-color: var(--app-input) !important;
  color: var(--app-text) !important;
  border: 1px solid rgba(85, 61, 42, 0.18) !important;
  border-radius: 14px;
  min-height: 46px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), var(--app-shadow-sm);
}

.form-select {
  cursor: pointer;
}

.form-select option {
  background: #fffaf4;
  color: var(--app-text);
}

.form-control::placeholder,
.bootstrap-table .search input::placeholder {
  color: rgba(85, 61, 42, 0.48) !important;
}

.form-control:focus,
.form-select:focus,
.bootstrap-table .search input:focus {
  background-color: var(--app-input-focus) !important;
  color: var(--app-text) !important;
  border-color: rgba(109, 74, 51, 0.36) !important;
  box-shadow: 0 0 0 0.18rem rgba(109, 74, 51, 0.1), inset 0 1px 0 rgba(255,255,255,0.55) !important;
}

.app-date-picker {
  position: relative;
  display: block;
}

.app-date-picker__control {
  padding-right: 3rem !important;
  cursor: text;
  font-variant-numeric: tabular-nums;
}

.app-date-picker__toggle {
  position: absolute;
  top: 50%;
  right: 0.45rem;
  width: 2.1rem;
  height: 2.1rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--app-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  transition: background-color .16s ease, color .16s ease;
}

.app-date-picker__toggle:hover,
.app-date-picker.is-open .app-date-picker__toggle {
  background: var(--app-primary-soft);
  color: var(--app-primary-hover);
}

.app-date-picker.is-invalid .app-date-picker__control {
  border-color: var(--app-danger) !important;
  box-shadow: 0 0 0 0.18rem rgba(220, 53, 69, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
}

.app-date-picker.is-invalid + .invalid-feedback {
  display: block;
}

.app-date-picker__panel {
  display: none;
  position: absolute;
  z-index: 2200;
  top: calc(100% + 0.45rem);
  bottom: auto;
  left: 0;
  width: min(19.5rem, calc(100vw - 2rem));
  padding: 1rem;
  background:
    radial-gradient(circle at top left, rgba(63, 111, 101, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 253, 249, 0.98) 0%, rgba(247, 238, 226, 0.98) 100%);
  border: 1px solid var(--app-border);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(53, 40, 30, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.35rem);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.app-date-picker.opens-up .app-date-picker__panel {
  top: auto;
  bottom: calc(100% + 0.45rem);
  transform: translateY(0.35rem);
}

.app-date-picker.align-right .app-date-picker__panel {
  left: auto;
  right: 0;
}

.app-date-picker.has-time .app-date-picker__panel {
  width: min(28rem, calc(100vw - 2rem));
  grid-template-columns: minmax(0, 1fr) 7.5rem;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.app-date-picker.is-time-only .app-date-picker__panel {
  width: min(9.5rem, calc(100vw - 2rem));
  padding: 0;
}

.app-date-picker.has-time .app-date-picker__calendar {
  min-width: 0;
  padding: 0.85rem;
}

.app-date-picker__time-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.95rem 0.45rem;
  border-left: 1px solid var(--app-border);
  background:
    linear-gradient(180deg, rgba(255, 253, 249, 0.98) 0%, rgba(247, 238, 226, 0.96) 100%);
}

.app-date-picker.is-time-only .app-date-picker__time-panel {
  border-left: 0;
  border-radius: 20px;
}

.app-date-picker__time-column {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.app-date-picker__time-option {
  width: 100%;
  min-height: 2.1rem;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--app-text);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

.app-date-picker__time-nav {
  width: 100%;
  min-height: 1.75rem;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--app-text-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

.app-date-picker__time-nav:hover {
  background: var(--app-primary-soft);
  border-color: rgba(109, 74, 51, 0.16);
  color: var(--app-primary);
}

.app-date-picker__time-option:hover {
  background: rgba(111, 78, 55, 0.1);
  border-color: rgba(111, 78, 55, 0.16);
  color: var(--app-primary);
}

.app-date-picker__time-option.is-selected {
  background: #7b4e34;
  border-color: #7b4e34;
  color: #fff;
  font-weight: var(--app-font-weight-bold);
}

.app-date-picker.is-open .app-date-picker__panel {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.app-date-picker.has-time.is-open .app-date-picker__panel {
  display: grid;
}

.app-date-picker.is-time-only.is-open .app-date-picker__panel {
  display: block;
}

.app-date-picker__header,
.app-date-picker__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.app-date-picker__title {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--app-primary);
  font-weight: var(--app-font-weight-extra-bold);
  text-align: left;
  text-transform: capitalize;
  white-space: nowrap;
}

.app-date-picker__title-wrapper {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.app-date-picker__year {
  min-width: 4.35rem;
  min-height: 2rem;
  border: 1px solid var(--app-border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--app-primary);
  font-size: 0.9rem;
  font-weight: var(--app-font-weight-bold);
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0 0.55rem;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.app-date-picker__year:hover,
.app-date-picker__year:focus {
  outline: 0;
  background: var(--app-primary-soft);
  border-color: rgba(109, 74, 51, 0.38);
  box-shadow: 0 0 0 0.18rem rgba(109, 74, 51, 0.12);
}

.app-date-picker__panel.is-year-mode .app-date-picker__year {
  min-width: 7.35rem;
}

.app-date-picker__controls {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.app-date-picker__nav {
  width: 2rem;
  height: 2rem;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--app-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

.app-date-picker__nav:hover {
  background: var(--app-primary-soft);
  border-color: rgba(111, 78, 55, 0.14);
  color: var(--app-primary);
}

.app-date-picker__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.28rem;
  margin-top: 0.85rem;
}

.app-date-picker__grid.is-year-view {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
}

.app-date-picker__weekday {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 1.8rem;
  color: #7f6653;
  font-size: 0.74rem;
  font-weight: var(--app-font-weight-bold);
  letter-spacing: 0.04em;
}

.app-date-picker__day {
  min-width: 0;
  min-height: 2rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--app-text);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

.app-date-picker__day:hover {
  background: rgba(111, 78, 55, 0.1);
  border-color: rgba(111, 78, 55, 0.16);
  color: var(--app-primary);
}

.app-date-picker__day:disabled,
.app-date-picker__year-option:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.app-date-picker__day:disabled:hover,
.app-date-picker__year-option:disabled:hover {
  background: transparent;
  border-color: transparent;
  color: var(--app-text);
}

.app-date-picker__day.is-muted {
  color: rgba(123, 98, 78, 0.52);
}

.app-date-picker__day.is-today {
  color: #3f6f65;
  background: rgba(63, 111, 101, 0.1);
  border-color: rgba(63, 111, 101, 0.2);
}

.app-date-picker__day.is-selected {
  background: #7b4e34;
  border-color: #7b4e34;
  color: #fff;
  font-weight: var(--app-font-weight-bold);
  box-shadow: 0 8px 14px rgba(74, 45, 24, 0.18);
}

.app-date-picker__year-option {
  min-width: 0;
  min-height: 2.45rem;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--app-text);
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

.app-date-picker__year-option:hover {
  background: rgba(111, 78, 55, 0.1);
  border-color: rgba(111, 78, 55, 0.16);
  color: var(--app-primary);
}

.app-date-picker__year-option.is-today {
  border-color: rgba(111, 78, 55, 0.28);
}

.app-date-picker__year-option.is-selected {
  background: #7b4e34;
  border-color: #7b4e34;
  color: #fff;
  font-weight: var(--app-font-weight-bold);
}

.app-date-picker__footer {
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--app-border);
}

.app-date-picker__footer-action {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--app-primary);
  font-weight: var(--app-font-weight-semibold);
}

.app-date-picker__footer-action:hover {
  color: var(--app-primary-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-check-input {
  width: 2.8rem;
  height: 1.45rem;
  margin-top: 0;
  border-color: rgba(85, 61, 42, 0.28);
  background-color: rgba(255,255,255,0.7);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.6);
}

.form-check-input:focus {
  box-shadow: 0 0 0 0.18rem rgba(109, 74, 51, 0.12) !important;
}

.form-check-input:checked {
  background-color: var(--app-primary);
  border-color: var(--app-primary);
}

.field-readonly {
  background: var(--app-readonly) !important;
  border-color: rgba(95, 66, 43, 0.14) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35) !important;
}

.field-static {
  background: var(--app-static) !important;
  border-color: rgba(95, 66, 43, 0.12) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45) !important;
}

.field-highlight {
  background: linear-gradient(180deg, #f4ead6 0%, #eee0c8 100%) !important;
  border-color: rgba(176, 139, 87, 0.38) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5) !important;
  font-size: 1.1rem;
  font-weight: 750;
  text-align: right;
}

.field-mono {
  font-variant-numeric: tabular-nums;
}

.form-text.product-form-help {
  margin-top: 0.45rem;
  color: var(--app-text-soft);
  font-size: 0.82rem;
}

.switch-box {
  min-height: 58px;
  display: flex;
  align-items: end;
  padding-bottom: 0.3rem;
}

.app-toggle-surface,
.facturar-card,
.invoice-card {
  min-height: 46px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.8rem 0.95rem;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,250,244,0.95) 0%, rgba(248,237,222,0.95) 100%);
  border: 1px solid rgba(95, 66, 43, 0.12);
  box-shadow: var(--app-shadow-sm);
}

.app-toggle-surface-head,
.facturar-head,
.invoice-card-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.8rem;
}

.app-toggle-surface .form-check {
  min-height: 0;
  display: flex;
  align-items: center;
  padding-left: 0;
}

.app-toggle-surface .form-check-input {
  float: none;
  flex: 0 0 auto;
  margin-left: 0;
}

.app-toggle-surface-title,
.facturar-title,
.invoice-card-title {
  font-weight: var(--app-font-weight-bold);
  color: var(--app-primary);
  line-height: 1.15;
}

.app-toggle-surface-help,
.facturar-help,
.invoice-card-help {
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--app-text-soft);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-weight: var(--app-font-weight-bold);
  font-size: 0.85rem;
  border: 1px solid transparent;
  white-space: nowrap;
}

.status-badge-success {
  background: rgba(25, 135, 84, 0.12);
  border-color: rgba(25, 135, 84, 0.22);
  color: #16643f;
}

.status-badge-danger {
  background: rgba(220, 53, 69, 0.11);
  border-color: rgba(220, 53, 69, 0.24);
  color: #8a2532;
}

.status-badge-pending {
  background: rgba(109, 74, 51, 0.12);
  border-color: rgba(109, 74, 51, 0.22);
  color: #6d4a33;
}

.status-badge-neutral {
  background: rgba(77, 70, 63, 0.08);
  border-color: rgba(77, 70, 63, 0.18);
  color: #4d463f;
}

.status-observation-note {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.35rem;
  color: #8a5b1f;
  font-weight: var(--app-font-weight-bold);
  white-space: nowrap;
}

.status-observation-note i {
  font-size: 0.82rem;
}

/* TomSelect */
.js [data-tom-select]:not(.tomselected) {
  visibility: hidden;
}

.ts-wrapper,
.ts-wrapper.form-control,
.ts-wrapper.form-select {
  width: 100%;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.ts-wrapper.ts-product,
.ts-wrapper.single {
  position: relative;
}

.ts-wrapper.ts-product .ts-control,
.ts-wrapper.single .ts-control {
  background: var(--app-input) !important;
  color: var(--app-text) !important;
  border: 1px solid rgba(85, 61, 42, 0.18) !important;
  border-radius: 14px !important;
  padding: 0.5rem 0.85rem !important;
  min-height: 46px;
  display: flex;
  align-items: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), var(--app-shadow-sm) !important;
  font-family: inherit !important;
  font-size: 1rem !important;
  line-height: 1.4 !important;
}

.ts-wrapper.single .ts-control .item {
  display: flex;
  align-items: center;
  line-height: 1.2;
}

.ts-wrapper.ts-product .ts-control > input,
.ts-wrapper.single .ts-control > input {
  color: var(--app-text) !important;
  font-family: inherit !important;
}

.ts-wrapper.ts-product .ts-control > input::placeholder,
.ts-wrapper.single .ts-control > input::placeholder {
  color: rgba(85, 61, 42, 0.48) !important;
}

.ts-wrapper.ts-product.focus .ts-control,
.ts-wrapper.ts-product .ts-control:focus-within,
.ts-wrapper.ts-product.dropdown-active .ts-control,
.ts-wrapper.single.focus .ts-control,
.ts-wrapper.single .ts-control:focus-within,
.ts-wrapper.single.dropdown-active .ts-control {
  background-color: var(--app-input-focus) !important;
  border-color: rgba(109, 74, 51, 0.36) !important;
  box-shadow: 0 0 0 0.18rem rgba(109, 74, 51, 0.1), inset 0 1px 0 rgba(255,255,255,0.55) !important;
}

.ts-wrapper.is-invalid .ts-control {
  border-color: var(--app-danger) !important;
  box-shadow: 0 0 0 0.18rem rgba(220, 53, 69, 0.1), inset 0 1px 0 rgba(255,255,255,0.55) !important;
}

.ts-dropdown {
  background-color: var(--app-surface-soft) !important;
  border-radius: 14px !important;
  border: 1px solid var(--app-border) !important;
  box-shadow: var(--app-shadow-md) !important;
  z-index: 2000 !important;
  overflow: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(109, 74, 51, 0.58) rgba(241, 228, 209, 0.78);
}

.ts-dropdown::-webkit-scrollbar {
  width: 10px;
}

.ts-dropdown::-webkit-scrollbar-track {
  background: rgba(241, 228, 209, 0.82);
  border-left: 1px solid rgba(109, 74, 51, 0.08);
}

.ts-dropdown::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(138, 98, 70, 0.92) 0%, rgba(109, 74, 51, 0.88) 100%);
  border-radius: 999px;
  border: 2px solid rgba(241, 228, 209, 0.9);
}

.ts-dropdown::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(149, 107, 78, 0.96) 0%, rgba(117, 80, 56, 0.92) 100%);
}

.ts-dropdown .option {
  padding: 0.7rem 0.9rem;
  color: var(--app-text);
}

.ts-dropdown .active,
.ts-dropdown .option:hover {
  background: var(--app-primary) !important;
  color: #fff !important;
}

.ts-dropdown .no-results {
  padding: 0.7rem 0.9rem;
  color: var(--app-text-soft);
}

/* TABLES */
.table-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.table-card-header .app-card-title {
  margin-bottom: 0.2rem;
}

.table-card-header .app-card-subtitle {
  margin-bottom: 0;
}

.table-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(150px, 200px) minmax(180px, 230px);
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}

.filter-search {
  position: relative;
}

.filter-search i {
  position: absolute;
  top: 50%;
  left: 0.9rem;
  z-index: 2;
  color: var(--app-text-soft);
  transform: translateY(-50%);
}

.filter-search .form-control {
  padding-left: 2.35rem;
}


.table-wrap {
  overflow-x: auto;
  background: transparent;
  container-type: inline-size;
}

[data-remote-table] {
  position: relative;
}

[data-remote-table].is-loading {
  opacity: 0.62;
  pointer-events: none;
}

[data-remote-table].is-loading::after {
  content: "";
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 22px;
  height: 22px;
  border: 3px solid rgba(109, 74, 51, 0.16);
  border-top-color: var(--app-primary);
  border-radius: 50%;
  animation: app-spin 0.75s linear infinite;
}

@keyframes app-spin {
  to {
    transform: rotate(360deg);
  }
}

.table {
  margin-bottom: 0;
  --bs-table-bg: transparent;
}

.app-table {
  min-width: 900px;
  border-collapse: separate;
  border-spacing: 0 0.55rem;
}

.table th,
.table td {
  color: var(--app-text);
  border-top: 0 !important;
  border-bottom: 1px solid rgba(94, 65, 43, 0.1) !important;
  border-left: none !important;
  border-right: none !important;
  background-color: transparent !important;
  vertical-align: middle;
}

.table thead th {
  padding: 0 0.85rem 0.35rem;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0;
  font-weight: var(--app-font-weight-extra-bold);
  color: #7c604e;
  background: transparent !important;
  white-space: nowrap;
}

.table tbody td {
  padding: 0.9rem 0.85rem;
  background: rgba(255, 250, 244, 0.66) !important;
}

.app-table tbody tr td:first-child {
  border-top-left-radius: 16px;
  border-bottom-left-radius: 16px;
}

.app-table tbody tr td:last-child {
  border-top-right-radius: 16px;
  border-bottom-right-radius: 16px;
}

.app-table-editable {
  table-layout: fixed;
  min-width: 0;
  width: 100%;
}

.app-table-editable thead th:first-child {
  padding-left: 1rem;
}

.app-table-editable thead th:last-child {
  padding-right: 1rem;
}

.app-table-editable thead th {
  padding: 0.62rem 0.75rem;
  font-size: 0.78rem;
}

.app-table-editable tbody td {
  padding: 0.58rem 0.6rem;
  vertical-align: middle;
}

.app-table-editable tbody tr td:first-child {
  padding-left: 1rem;
}

.app-table-editable tbody tr td:last-child {
  padding-right: 1rem;
}

.app-table-editable .form-control,
.app-table-editable .form-select,
.app-table-editable .ts-wrapper.single .ts-control {
  min-height: 42px;
}

.app-table-editable .form-control,
.app-table-editable .form-select {
  padding-top: 0.38rem;
  padding-bottom: 0.38rem;
}

.app-table-editable .ts-wrapper.single .ts-control {
  padding-right: 2rem;
  font-size: 1rem;
}

.app-table-editable .btn-table-action {
  width: 40px;
  height: 40px;
}

.app-table-editable .field-mono {
  letter-spacing: 0;
}

.app-table-editable .actions-cell {
  white-space: nowrap;
}

.sales-summary-actions {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.sales-summary-actions > form,
.sales-summary-actions > div {
  width: 100%;
}

.sales-summary-action {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  white-space: normal;
}

.table tbody tr {
  transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

.table tbody tr:hover {
  box-shadow: 0 8px 18px rgba(62, 42, 28, 0.08);
}

.table tbody tr:hover td {
  background: rgba(255, 250, 244, 0.92) !important;
}

.table-striped tbody tr:nth-child(odd) {
  background: rgba(255, 249, 241, 0.32) !important;
}

.table .actions-cell {
  white-space: nowrap;
}

.actions-cell {
  min-width: 112px;
}

.actions-cell .btn + .btn {
  margin-left: 0.35rem;
}

.readonly-media-box {
  width: min(100%, 320px);
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-md);
  background: rgba(255, 250, 244, 0.68);
}

.readonly-media-box-circle {
  width: 180px;
  aspect-ratio: 1;
  border-radius: 50%;
}

.readonly-media-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.readonly-media-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #fffaf4;
  font-size: 2.2rem;
  font-weight: var(--app-font-weight-extra-bold);
  background: linear-gradient(135deg, #a16f4b 0%, #6d4a33 100%);
}

.readonly-media-fallback-circle {
  border-radius: 50%;
}

.readonly-badge-box {
  min-height: 48px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--app-border);
  border-radius: 14px;
  background: rgba(255, 250, 244, 0.7);
}

.readonly-image-uploader {
  cursor: default;
}

.readonly-image-uploader:hover {
  background: rgba(255, 250, 244, 0.68);
  border-color: var(--app-border);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.table-responsive {
  overflow-x: auto;
}

@container (max-width: 920px) {
  .app-responsive-table {
    min-width: 0;
    width: 100%;
  }

  .app-responsive-table thead th[data-mobile-hidden],
  .app-responsive-table tbody td[data-mobile-hidden] {
    display: none;
  }

  .app-responsive-table .actions-cell {
    min-width: 0;
  }

  .app-responsive-table .btn-table-action {
    width: 42px;
    height: 42px;
  }

  .app-responsive-table .employee-cell-copy small,
  .app-responsive-table .table-muted-text {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  main.main-content.layout-wrapper {
    padding-inline: 1rem;
  }

  .sidebar-link:hover {
    transform: none;
  }
}

@media (max-width: 991.98px) {
  .table-filters,
  .app-filter-grid {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 0.65rem;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 1rem;
    padding: 0.75rem;
    border: 1px solid rgba(109, 74, 51, 0.12);
    border-radius: 18px;
    background: rgba(255, 250, 244, 0.58);
  }

  .table-filters > *,
  .app-filter-grid > * {
    width: 100%;
    min-width: 0;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .table-filters .filter-search,
  .app-filter-grid .filter-search {
    grid-column: auto;
  }

  .table-filters .form-control,
  .table-filters .form-select,
  .table-filters .ts-wrapper,
  .app-filter-grid .form-control,
  .app-filter-grid .form-select,
  .app-filter-grid .ts-wrapper {
    width: 100%;
  }

  .table-wrap:has(.app-responsive-table) {
    overflow-x: visible;
  }

  .table-responsive:has(.sales-products-table) {
    overflow: visible;
  }

  .sales-products-table {
    min-width: 0;
    width: 100%;
    border-spacing: 0;
  }

  .sales-products-table thead {
    display: none;
  }

  .sales-products-table tbody,
  .sales-products-table tr,
  .sales-products-table td {
    display: block;
    width: 100%;
  }

  .sales-products-table tbody tr {
    display: grid;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 48px;
    gap: 0.72rem;
    margin-bottom: 0.85rem;
    padding: 0.72rem;
    border: 1px solid rgba(109, 74, 51, 0.12);
    border-radius: 18px;
    background: rgba(255, 250, 244, 0.82);
    box-shadow: 0 10px 22px rgba(62, 42, 28, 0.07);
  }

  .sales-products-table tbody td {
    min-width: 0;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  .sales-products-table tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.32rem;
    color: #7c604e;
    font-size: 0.72rem;
    font-weight: var(--app-font-weight-extra-bold);
    line-height: 1.2;
    text-transform: uppercase;
  }

  .sales-products-table [data-sale-product-cell="product"],
  .sales-products-table [data-sale-product-cell="subtotal"] {
    grid-column: 1 / -1;
  }

  .sales-products-table [data-sale-product-cell="quantity"] {
    grid-column: 1 / 2;
  }

  .sales-products-table [data-sale-product-cell="unit-price"] {
    grid-column: 2 / 4;
  }

  .sales-products-table [data-sale-product-cell="actions"] {
    grid-column: 3 / 4;
    grid-row: 4;
    align-self: end;
  }

  .sales-products-table [data-sale-product-cell="subtotal"] {
    grid-column: 1 / 3;
    grid-row: 4;
  }

  .sales-products-table [data-sale-product-cell="actions"] {
    display: flex;
    justify-content: flex-end;
    padding-top: 0 !important;
  }

  .sales-products-table [data-sale-product-cell="actions"]::before {
    display: none;
  }

  .sales-products-table [data-sale-product-cell="subtotal"] .form-control {
    width: 100%;
    max-width: none;
  }

  .sales-products-table tbody tr.sale-product-row-readonly {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sales-products-table tbody tr.sale-product-row-readonly [data-sale-product-cell="unit-price"] {
    grid-column: 2 / 3;
  }

  .sales-products-table tbody tr.sale-product-row-readonly [data-sale-product-cell="subtotal"] {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .sales-products-table .form-control,
  .sales-products-table .form-select,
  .sales-products-table .ts-wrapper.single .ts-control {
    width: 100%;
    min-height: 44px;
  }

  .sales-products-table .ts-wrapper {
    min-width: 0;
  }

  .sales-products-table .btn-table-action {
    width: 44px;
    height: 44px;
  }

  .app-responsive-table {
    min-width: 0;
    width: 100%;
    border-spacing: 0;
  }

  .app-responsive-table thead {
    display: none;
  }

  .app-responsive-table tbody,
  .app-responsive-table tr,
  .app-responsive-table td {
    display: block;
    width: 100%;
  }

  .app-responsive-table tbody tr {
    display: grid;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    gap: 0.68rem;
    margin-bottom: 0.85rem;
    padding: 0.85rem;
    overflow: hidden;
    border: 1px solid rgba(109, 74, 51, 0.12);
    border-radius: 18px;
    background: rgba(255, 250, 244, 0.78);
    box-shadow: 0 10px 22px rgba(62, 42, 28, 0.07);
  }

  .app-responsive-table tbody tr:hover {
    box-shadow: 0 12px 24px rgba(62, 42, 28, 0.1);
  }

  .app-responsive-table tbody td {
    box-sizing: border-box;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.9rem;
    min-width: 0;
    padding: 0;
    border-bottom: 0 !important;
    background: transparent !important;
    text-align: right;
  }

  .app-responsive-table tbody td[data-card-metric] {
    display: grid;
    grid-template-columns: minmax(76px, auto) minmax(0, 1fr);
    align-items: start;
    column-gap: 0.9rem;
    text-align: left;
  }

  .app-responsive-table tbody td[data-card-metric]::before {
    max-width: none;
  }

  .app-responsive-table tbody td:first-child,
  .app-responsive-table tbody td:last-child {
    border-radius: 0;
  }

  .app-responsive-table tbody td:last-child {
    border-bottom: 0 !important;
  }

  .app-responsive-table tbody td[data-card-primary] {
    display: block;
    padding: 0 0 0.78rem;
    border-bottom: 1px solid rgba(109, 74, 51, 0.1) !important;
    text-align: left;
    background: transparent !important;
  }

  .app-responsive-table tbody td[data-mobile-hidden] {
    display: none !important;
  }

  .app-responsive-table tbody td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    max-width: 44%;
    color: #7c604e;
    font-size: 0.74rem;
    font-weight: var(--app-font-weight-extra-bold);
    letter-spacing: 0;
    text-align: left;
    text-transform: uppercase;
  }

  .app-responsive-table tbody td[data-label=""],
  .app-responsive-table tbody td.responsive-table-empty {
    display: block;
    text-align: left;
  }

  .app-responsive-table tbody td[data-label=""]::before,
  .app-responsive-table tbody td.responsive-table-empty::before,
  .app-responsive-table tbody td[data-card-primary]::before {
    display: none;
  }

  .app-responsive-table tbody td[data-card-primary] .employee-cell {
    width: 100%;
    justify-content: flex-start;
  }

  .app-responsive-table tbody td[data-card-primary] .employee-cell-copy {
    flex: 1 1 auto;
    min-width: 0;
    align-items: flex-start;
    text-align: left;
  }

  .app-responsive-table tbody td:not([data-card-primary]) .employee-cell {
    justify-content: flex-end;
  }

  .app-responsive-table tbody td:not([data-card-primary]) .employee-cell-copy {
    align-items: flex-end;
    text-align: right;
  }

  .app-responsive-table .role-badge-list {
    justify-content: flex-end;
  }

  .app-responsive-table .table-card-value {
    min-width: 0;
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 0.16rem;
    text-align: right;
  }

  .app-responsive-table .table-card-meta {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.16rem 0.5rem;
  }

  .app-responsive-table .employee-cell-copy strong,
  .app-responsive-table .table-main-text {
    max-width: 100%;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .app-responsive-table .employee-cell-copy small,
  .app-responsive-table .table-muted-text {
    max-width: 100%;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .app-responsive-table .document-pill,
  .app-responsive-table .muted-pill,
  .app-responsive-table .role-badge,
  .app-responsive-table .status-badge {
    max-width: 100%;
    white-space: normal;
    text-align: right;
  }

  .app-responsive-table .table-card-value .status-badge {
    align-self: flex-end;
  }

  .app-responsive-table .actions-cell {
    min-width: 0;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 0.1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(109, 74, 51, 0.1) !important;
  }

  .app-responsive-table .actions-cell .btn-table-action {
    width: 46px;
    height: 46px;
  }

  .app-responsive-table .actions-cell::before {
    display: none;
  }

  .statistics-table-desktop {
    display: none;
  }

  .statistics-mobile-list {
    display: grid;
    gap: 0.78rem;
  }

  .statistics-mobile-card {
    min-width: 0;
    padding: 0.85rem;
    overflow: hidden;
    border: 1px solid rgba(109, 74, 51, 0.12);
    border-radius: 18px;
    background: rgba(255, 250, 244, 0.78);
    box-shadow: 0 10px 22px rgba(62, 42, 28, 0.07);
  }

  .statistics-mobile-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.68rem;
    border-bottom: 1px solid rgba(109, 74, 51, 0.1);
  }

  .statistics-mobile-card-header strong {
    min-width: 0;
    color: var(--app-text);
    font-weight: var(--app-font-weight-extra-bold);
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .statistics-mobile-card-header span {
    flex: 0 0 auto;
    color: var(--app-primary);
    font-weight: var(--app-font-weight-extra-bold);
    font-variant-numeric: tabular-nums;
  }

  .statistics-mobile-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin-top: 0.75rem;
  }

  .statistics-mobile-metrics div {
    min-width: 0;
    padding: 0.64rem;
    border: 1px solid rgba(109, 74, 51, 0.09);
    border-radius: 12px;
    background: rgba(248, 239, 226, 0.48);
  }

  .statistics-mobile-metrics span {
    display: block;
    margin-bottom: 0.18rem;
    color: #7c604e;
    font-size: 0.72rem;
    font-weight: var(--app-font-weight-extra-bold);
    line-height: 1.2;
    text-transform: uppercase;
  }

  .statistics-mobile-metrics strong {
    display: block;
    min-width: 0;
    color: var(--app-primary);
    font-weight: var(--app-font-weight-extra-bold);
    font-variant-numeric: tabular-nums;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .statistics-mobile-share {
    height: 0.62rem;
    margin-top: 0.75rem;
    overflow: hidden;
    border: 1px solid rgba(109, 74, 51, 0.12);
    border-radius: var(--app-radius-pill);
    background: rgba(255, 250, 244, 0.82);
  }

  .statistics-mobile-share span {
    display: block;
    height: 100%;
    min-width: 0.35rem;
    max-width: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #8a654c 0%, #d1a472 100%);
  }

  .statistics-mobile-weekdays {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.75rem;
  }

  .statistics-mobile-weekday {
    display: grid;
    grid-template-columns: minmax(46px, auto) minmax(0, 1fr) minmax(74px, auto);
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    padding: 0.64rem;
    border: 1px solid rgba(109, 74, 51, 0.09);
    border-radius: 12px;
    background: rgba(109, 74, 51, var(--heat-opacity, 0.06));
  }

  .statistics-mobile-weekday span {
    color: #7c604e;
    font-size: 0.74rem;
    font-weight: var(--app-font-weight-extra-bold);
    text-transform: uppercase;
  }

  .statistics-mobile-weekday strong {
    justify-self: end;
    color: var(--app-primary);
    font-weight: var(--app-font-weight-extra-bold);
    font-variant-numeric: tabular-nums;
  }

  .statistics-mobile-weekday small {
    justify-self: end;
    min-width: 0;
    color: var(--app-text-soft);
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
  }

  .statistics-products-table,
  .statistics-weekday-table {
    min-width: 0;
  }

  .statistics-products-table tbody td[data-label="Participacion"] {
    display: block !important;
    width: 100%;
    min-width: 0;
    text-align: left;
  }

  .statistics-products-table tbody td[data-label="Participacion"]::before {
    display: block;
    max-width: none;
    margin-bottom: 0.45rem;
  }

  .statistics-products-table .statistics-share {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) minmax(52px, auto);
    min-width: 0;
    box-sizing: border-box;
  }

  .statistics-products-table .statistics-mini-track {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .statistics-weekday-table tbody td:not([data-card-primary]) {
    display: block !important;
    width: 100%;
    min-width: 0;
    text-align: left;
  }

  .statistics-weekday-table tbody td:not([data-card-primary])::before {
    display: block;
    max-width: none;
    margin-bottom: 0.45rem;
  }

  .statistics-weekday-table .statistics-heat-cell {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    align-items: flex-end;
    padding: 0.52rem 0.65rem;
  }

  .statistics-weekday-table .statistics-heat-cell small {
    white-space: normal;
    text-align: right;
  }
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(109, 74, 51, 0.1);
  color: var(--app-text-soft);
  font-size: 0.9rem;
}

.table-total {
  min-width: 120px;
  color: var(--app-primary);
  font-weight: var(--app-font-weight-bold);
}

.table-per-page {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  color: var(--app-text-soft);
  font-weight: var(--app-font-weight-semibold);
  white-space: nowrap;
}

.table-per-page .ts-wrapper {
  width: 72px;
}

.table-per-page .ts-control {
  min-height: 36px;
  border-radius: 12px !important;
  padding: 0.32rem 0.62rem !important;
  font-size: 0.9rem !important;
}

.table-footer nav {
  display: flex;
}

.table-footer .pagination {
  margin: 0;
  gap: 0.35rem;
}

.table-footer .page-link {
  min-width: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--app-border);
  border-radius: 12px !important;
  background: var(--app-input);
  color: var(--app-primary);
  font-weight: var(--app-font-weight-bold);
  box-shadow: var(--app-shadow-sm);
}

.table-footer .page-item.active .page-link {
  background: var(--app-primary);
  border-color: var(--app-primary);
  color: #fff;
}

.table-footer .page-item.disabled .page-link {
  background: rgba(255, 250, 244, 0.5);
  color: rgba(85, 61, 42, 0.42);
  box-shadow: none;
}

.empty-table-state {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--app-text-soft);
  text-align: center;
}

.empty-table-state i {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.2rem;
  border-radius: 50%;
  background: var(--app-primary-soft);
  color: var(--app-primary);
}

.empty-table-state strong {
  color: var(--app-primary);
}

.detail-panel {
  background: #f5ecdf;
  border: 1px solid var(--app-border);
  border-radius: 14px;
  padding: 1rem;
}

.list-group-item {
  background: #f7efe4;
  color: var(--app-text);
  border-color: var(--app-border);
}

.list-group-item.beige {
  background: #f7efe4 !important;
}

/* Bootstrap-table generated controls */
.bootstrap-table .fixed-table-toolbar,
.bootstrap-table .fixed-table-pagination {
  padding: 0 0 1rem;
}

.bootstrap-table .search {
  margin-bottom: 1rem;
}

.bootstrap-table .search input {
  min-height: 44px;
}

.bootstrap-table .page-link {
  color: var(--app-primary);
  border-color: var(--app-border);
  background: #f9f2e8;
}

.bootstrap-table .page-item.active .page-link {
  background: var(--app-primary);
  border-color: var(--app-primary);
  color: #fff;
}

.bootstrap-table .card-view {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--app-border);
}

.fixed-table-container {
  border: 0 !important;
}

.fixed-table-container .fixed-table-body {
  border-radius: 0 0 18px 18px;
}

.bootstrap-table .fixed-table-toolbar {
  display: flex;
  justify-content: flex-end;
}

.bootstrap-table .fixed-table-toolbar .search {
  width: min(100%, 360px);
}

.bootstrap-table .search input {
  padding-left: 2.35rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%236d4a33' viewBox='0 0 16 16'%3e%3cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85-.017.016zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-size: 15px 15px !important;
  background-position: 0.85rem center !important;
}

/* MODALS */
.app-delete-modal {
  overflow: hidden;
  background: var(--app-surface-soft);
  border: 1px solid var(--app-border);
  border-radius: 18px;
  box-shadow: var(--app-shadow-md);
}

.app-delete-modal .modal-header,
.app-delete-modal .modal-footer {
  border-color: var(--app-border);
  background: rgba(255, 250, 244, 0.58);
}

.app-delete-modal .modal-header {
  padding: 1rem 1.15rem;
}

.app-delete-modal .modal-body {
  padding: 1rem 1.15rem 1.1rem;
}

.app-delete-modal .modal-footer {
  gap: 0.55rem;
  padding: 0.9rem 1.15rem;
}

.delete-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.delete-modal-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 14px;
  background: rgba(220, 53, 69, 0.1);
  color: #9f2634;
}

.app-delete-modal .modal-title {
  color: var(--app-primary);
  font-size: 1.05rem;
  font-weight: var(--app-font-weight-extra-bold);
}

.delete-modal-subtitle,
.delete-modal-copy {
  margin: 0;
  color: var(--app-text-soft);
  font-size: 0.9rem;
}

.delete-modal-data {
  display: grid;
  grid-template-columns: minmax(90px, auto) 1fr;
  gap: 0.45rem 0.8rem;
  margin: 0.9rem 0 0;
  padding: 0.85rem;
  border: 1px solid rgba(109, 74, 51, 0.12);
  border-radius: 14px;
  background: rgba(255, 250, 244, 0.72);
}

.delete-modal-data dt,
.delete-modal-data dd {
  margin: 0;
}

.delete-modal-data dt {
  color: var(--app-primary);
  font-weight: var(--app-font-weight-bold);
}

.delete-modal-data dd {
  min-width: 0;
  color: var(--app-text);
  overflow-wrap: anywhere;
}

/* HELPERS */
.text-beige { color: var(--app-bg) !important; }
.text-marron { color: var(--app-primary) !important; }
.menu-text { color: #fff; }
.detail-icon { color: var(--app-primary); }
.cardPersonalizada { background-color: var(--app-primary); }

.text-money {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.page-section {
  margin-top: 1rem;
}

.page-actions-bottom {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.35rem;
}

.kpi-inline {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: #f5ecdf;
  border: 1px solid var(--app-border);
}

.kpi-inline strong {
  color: var(--app-primary);
  font-size: 1.15rem;
}

.employee-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.employee-cell-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.employee-cell-copy strong,
.table-main-text {
  color: var(--app-text);
  font-weight: var(--app-font-weight-bold);
}

.employee-cell-copy small,
.table-muted-text {
  display: block;
  max-width: 260px;
  overflow: hidden;
  color: var(--app-text-soft);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-labor-summary {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.04rem;
}

.employee-labor-summary strong {
  color: var(--app-text);
  font-weight: var(--app-font-weight-extra-bold);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.employee-labor-summary small {
  color: var(--app-text-soft);
  font-size: 0.82rem;
  font-weight: var(--app-font-weight-semibold);
}

.employee-labor-meta {
  margin-top: 0.18rem;
}

.employee-access-layout {
    align-items: stretch;
}

.employee-password-field {
    position: relative;
}

.employee-password-field .form-control {
    padding-right: 3.2rem;
}

.employee-password-field--with-generator .form-control {
    padding-right: 6.4rem;
}

.employee-password-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(109, 74, 51, 0.08);
    color: var(--app-primary);
    transform: translateY(-50%);
}

.employee-password-toggle:hover,
.employee-password-toggle:focus-visible {
    background: rgba(109, 74, 51, 0.14);
}

.employee-password-toggle:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 0.18rem rgba(109, 74, 51, 0.14);
}

.employee-password-toggle svg {
    width: 1.05rem;
    height: 1.05rem;
    display: block;
    fill: currentColor;
}

.employee-password-field--with-generator .employee-password-toggle {
    right: 3.65rem;
}

.employee-password-helper {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    margin-top: 0.45rem;
}

.employee-password-helper small {
    color: var(--app-text-soft);
    font-size: 0.78rem;
    line-height: 1.25;
}

.employee-password-generate {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 3.05rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0 var(--app-radius-sm) var(--app-radius-sm) 0;
    background: var(--app-primary);
    color: var(--app-surface);
}

.employee-password-generate:hover,
.employee-password-generate:focus-visible {
    background: var(--app-primary-strong);
    color: var(--app-surface);
}

.employee-password-generate:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 0.18rem rgba(109, 74, 51, 0.18);
}

.employee-password-generate svg {
    width: 1.1rem;
    height: 1.1rem;
    display: block;
    fill: currentColor;
}

.product-form-layout {
  align-items: stretch;
}

.product-form-layout > [class*="col-"] {
  margin-bottom: 1rem;
}

.product-form-media-col,
.product-form-fields-col {
  width: 100%;
}

.product-form-layout .app-card-subtitle {
  max-width: 34rem;
  font-size: 0.96rem;
}

.product-summary-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1rem;
  border: 1px solid rgba(109, 74, 51, 0.12);
  border-radius: 18px;
  background: rgba(255, 250, 244, 0.72);
  box-shadow: var(--app-shadow-sm);
}

.product-summary-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.product-summary-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.1rem;
  flex-wrap: wrap;
}

.product-summary-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.product-summary-media {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 18px;
  overflow: hidden;
}

.product-summary-media.is-clickable {
  cursor: zoom-in;
}

.product-list-media {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 16px;
  overflow: hidden;
  cursor: zoom-in;
}

.product-summary-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.product-summary-eyebrow {
  color: var(--app-text-soft);
  font-size: 0.74rem;
  font-weight: var(--app-font-weight-extra-bold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.product-summary-title {
  margin: 0;
  color: var(--app-primary);
  font-size: 1.18rem;
  line-height: 1.2;
  font-weight: var(--app-font-weight-extra-bold);
}

.product-summary-rate {
  display: flex;
  align-items: center;
}

.product-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 0.65rem;
  flex: 1 1 420px;
}

.product-summary-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.35rem;
  min-height: 92px;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(247, 239, 228, 0.92) 0%, rgba(241, 228, 209, 0.92) 100%);
  border: 1px solid rgba(109, 74, 51, 0.1);
}

.product-summary-item span {
  color: var(--app-text-soft);
  font-size: 0.85rem;
  font-weight: var(--app-font-weight-semibold);
}

.product-summary-item strong {
  color: var(--app-primary);
  font-size: 1.02rem;
  font-weight: var(--app-font-weight-extra-bold);
  font-variant-numeric: tabular-nums;
}

.product-summary-item-accent {
  background: linear-gradient(180deg, rgba(109, 74, 51, 0.1) 0%, rgba(109, 74, 51, 0.14) 100%);
}

.sales-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.sales-summary-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.3rem;
  min-height: 96px;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(247, 239, 228, 0.92) 0%, rgba(241, 228, 209, 0.92) 100%);
  border: 1px solid rgba(109, 74, 51, 0.1);
}

.sales-summary-item span {
  color: var(--app-text-soft);
  font-size: 0.85rem;
  font-weight: var(--app-font-weight-semibold);
}

.sales-summary-item strong {
  color: var(--app-primary);
  font-size: 1.08rem;
  font-weight: var(--app-font-weight-extra-bold);
  font-variant-numeric: tabular-nums;
}

.sales-summary-item small {
  color: var(--app-text-soft);
  font-size: 0.8rem;
}

.sales-summary-item-accent {
  background: linear-gradient(180deg, rgba(109, 74, 51, 0.1) 0%, rgba(109, 74, 51, 0.14) 100%);
}

.sales-summary-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
}

.sales-summary-meta strong {
  font-weight: var(--app-font-weight-extra-bold);
}

.sales-summary-meta span {
  color: var(--app-text-soft);
}

.sales-summary-meta-danger strong {
  color: #b23b2d;
}

/* STATISTICS */
.statistics-range-pill {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-pill);
  background: rgba(255, 250, 244, 0.72);
  color: var(--app-primary);
  font-weight: var(--app-font-weight-bold);
  box-shadow: var(--app-shadow-sm);
}

.statistics-range-pill-muted {
  background: rgba(109, 74, 51, 0.08);
  color: var(--app-text-soft);
}

.statistics-filters-grid {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) repeat(3, minmax(180px, 1fr));
  gap: 0.85rem 1rem;
  align-items: end;
}

.statistics-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 0.85rem;
}

.statistics-metric {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.3rem;
  min-height: 118px;
  padding: 1rem;
  border: 1px solid rgba(109, 74, 51, 0.1);
  border-radius: var(--app-radius-md);
  background: linear-gradient(180deg, rgba(247, 239, 228, 0.94) 0%, rgba(241, 228, 209, 0.94) 100%);
  box-shadow: var(--app-shadow-sm);
}

.statistics-metric span {
  color: var(--app-text-soft);
  font-size: 0.86rem;
  font-weight: var(--app-font-weight-semibold);
}

.statistics-metric strong {
  max-width: 100%;
  color: var(--app-primary);
  font-size: clamp(1.08rem, 1rem + 0.45vw, 1.45rem);
  font-weight: var(--app-font-weight-extra-bold);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.statistics-metric small {
  color: var(--app-text-soft);
  font-size: 0.8rem;
}

.statistics-metric-accent {
  background: linear-gradient(180deg, rgba(109, 74, 51, 0.1) 0%, rgba(109, 74, 51, 0.15) 100%);
}

.statistics-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: 1rem;
  align-items: start;
}

.statistics-card {
  min-width: 0;
}

.statistics-bars,
.statistics-payment-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.statistics-bar-row {
  display: grid;
  grid-template-columns: minmax(54px, 72px) minmax(140px, 1fr) minmax(110px, auto) minmax(72px, auto);
  gap: 0.7rem;
  align-items: center;
  padding: 0.45rem 0;
}

.statistics-bar-label {
  color: var(--app-text-soft);
  font-weight: var(--app-font-weight-bold);
}

.statistics-bar-row strong,
.statistics-payment-item small {
  color: var(--app-primary);
  font-weight: var(--app-font-weight-extra-bold);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.statistics-bar-row small,
.statistics-payment-item span,
.statistics-cell-help {
  color: var(--app-text-soft);
  font-size: 0.8rem;
}

.statistics-bar-track,
.statistics-mini-track {
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(109, 74, 51, 0.1);
  border-radius: var(--app-radius-pill);
  background: rgba(255, 250, 244, 0.68);
}

.statistics-bar-track {
  height: 0.95rem;
}

.statistics-mini-track {
  height: 0.55rem;
}

.statistics-bar-track span,
.statistics-mini-track span {
  display: block;
  height: 100%;
  min-width: 0.35rem;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(109, 74, 51, 0.82) 0%, rgba(191, 151, 103, 0.88) 100%);
}

.statistics-payment-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem 0.75rem;
  padding: 0.85rem;
  border: 1px solid rgba(109, 74, 51, 0.1);
  border-radius: 14px;
  background: rgba(255, 250, 244, 0.56);
}

.statistics-payment-item > div:not(.statistics-share) {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.statistics-payment-item strong {
  color: var(--app-text);
  font-weight: var(--app-font-weight-extra-bold);
}

.statistics-payment-item .statistics-share {
  grid-column: 1 / -1;
}

.statistics-payment-share-row {
  grid-template-columns: minmax(0, 1fr) minmax(52px, auto);
}

.statistics-payment-share {
  color: var(--app-primary);
  font-weight: var(--app-font-weight-extra-bold);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  align-self: center;
  justify-self: end;
}

.statistics-mobile-list {
  display: none;
}

.overtime-filters {
  grid-template-columns: minmax(180px, 1fr) minmax(190px, 1fr) minmax(150px, 180px) minmax(150px, 180px) !important;
}

.overtime-filters-simple {
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 180px) minmax(150px, 180px) !important;
}

.overtime-show-actions {
  gap: 0.65rem;
  flex-wrap: wrap;
}

.overtime-show-actions form {
  margin: 0;
}

.overtime-show-actions .btn-save {
  width: auto;
}

@media (max-width: 767.98px) {
  .overtime-filters {
    grid-template-columns: 1fr !important;
  }

  .statistics-table-desktop {
    display: none;
  }

  .statistics-mobile-list {
    display: grid;
    gap: 0.78rem;
  }
}

.statistics-products-table {
  min-width: 820px;
}

.statistics-share {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(52px, auto);
  align-items: center;
  gap: 0.65rem;
}

.statistics-share strong {
  color: var(--app-primary);
  font-weight: var(--app-font-weight-extra-bold);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.statistics-weekday-table {
  min-width: 1050px;
}

.statistics-weekday-table td {
  vertical-align: middle;
}

.statistics-heat-cell {
  display: flex;
  min-width: 92px;
  flex-direction: column;
  align-items: center;
  gap: 0.12rem;
  padding: 0.52rem 0.45rem;
  border: 1px solid rgba(109, 74, 51, 0.09);
  border-radius: 12px;
  background: rgba(109, 74, 51, var(--heat-opacity, 0.06));
}

.statistics-heat-cell strong {
  color: var(--app-primary);
  font-weight: var(--app-font-weight-extra-bold);
  font-variant-numeric: tabular-nums;
}

.statistics-heat-cell small {
  color: var(--app-text-soft);
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
}

.statistics-cell-help {
  display: block;
  margin-top: 0.15rem;
}

.sales-entry-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.78fr) minmax(320px, 0.82fr);
  gap: 1rem;
  align-items: start;
}

.sales-entry-main {
  min-width: 0;
}

.sales-entry-main > form {
  margin-top: 1rem;
}

.sales-entry-summary {
  align-self: start;
}

.sales-summary-card {
  padding: 1rem;
}

.sales-summary-card.is-fixed {
  position: fixed;
  top: calc(var(--nav-height) + 1rem);
  z-index: 1010;
  max-height: calc(100vh - var(--nav-height) - 2.75rem);
  overflow: auto;
}

.sales-summary-card .sales-summary-grid {
  grid-template-columns: 1fr;
  margin-bottom: 0;
}

.sales-summary-card .page-actions-bottom {
  margin-top: 1rem;
}

.sales-panel {
  display: none;
}

.sales-panel.is-active {
  display: block;
}

.product-photo-preview,
.product-summary-avatar,
.product-list-avatar {
  border-radius: 18px;
}

.product-photo-preview {
  width: 100%;
  height: 100%;
  border-radius: 22px;
  object-fit: cover;
}

.product-summary-avatar {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.96) 0%, rgba(244, 233, 219, 0.92) 100%);
  border: 1px solid rgba(109, 74, 51, 0.08);
  box-shadow: var(--app-shadow-sm);
}

.product-summary-media .employee-photo-preview,
.product-summary-media .employee-avatar-fallback {
  border-radius: 18px !important;
}

.product-summary-media .employee-avatar-fallback i {
  transform: none;
}

.product-list-avatar {
  width: 48px;
  height: 48px;
}

.product-list-avatar i {
  font-size: 1rem;
  transform: none;
}

.product-list-media .employee-photo-preview,
.product-list-media .employee-avatar-fallback,
.product-list-avatar {
  border-radius: 16px !important;
}

.employee-access-layout > [class*="col-"] {
  margin-bottom: 1.25rem;
}

.employee-access-fields {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 0.9rem;
}

.employee-access-fields > .row {
  width: 100%;
}

.employee-access-header {
  width: 100%;
}

.employee-access-header .app-card-title {
  margin-bottom: 0.45rem;
}

.employee-access-header .app-card-subtitle {
  margin-bottom: 0;
  max-width: 44rem;
  font-size: 0.94rem;
}

.employee-avatar,
.employee-photo-preview {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  background: var(--app-primary);
  color: #fffaf4;
  font-weight: var(--app-font-weight-extra-bold);
  letter-spacing: 0;
  border: 1px solid rgba(109, 74, 51, 0.14);
  box-shadow: var(--app-shadow-sm);
}

.employee-list-media {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 50%;
  overflow: hidden;
  cursor: zoom-in;
}

.employee-photo-preview {
  width: 88px;
  height: 88px;
  font-size: 1.05rem;
}

.image-uploader--rounded .product-photo-preview,
.image-uploader--rounded .product-photo-fallback,
[data-product-photo-dropzone] .product-photo-preview,
[data-product-photo-dropzone] .product-photo-fallback {
  border-radius: 22px;
}

.employee-avatar-fallback {
  background: var(--app-primary);
  color: #fffaf4;
}

.document-pill,
.muted-pill {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.62rem;
  border-radius: var(--app-radius-pill);
  font-size: 0.86rem;
  font-weight: var(--app-font-weight-bold);
  white-space: nowrap;
}

.document-pill {
  background: rgba(109, 74, 51, 0.1);
  color: var(--app-primary);
}

.muted-pill {
  background: rgba(85, 61, 42, 0.08);
  color: var(--app-text-soft);
}

.image-uploader,
.employee-photo-dropzone {
  min-height: 132px;
  display: flex;
  position: relative;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px dashed rgba(109, 74, 51, 0.32);
  border-radius: var(--app-radius-md);
  background: rgba(255, 250, 244, 0.62);
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.image-uploader:hover,
.image-uploader.dragging,
.employee-photo-dropzone:hover,
.employee-photo-dropzone.dragging {
  background: var(--app-primary-soft);
  border-color: rgba(109, 74, 51, 0.52);
  box-shadow: var(--app-shadow-sm);
  transform: translateY(-1px);
}

.readonly-image-uploader,
.readonly-image-uploader:hover,
.readonly-image-uploader.dragging {
  cursor: default !important;
  background: rgba(255, 250, 244, 0.62) !important;
  border-color: rgba(109, 74, 51, 0.32) !important;
  box-shadow: none !important;
  transform: none !important;
}

.readonly-image-preview-trigger,
.readonly-image-preview-trigger:hover,
.readonly-image-preview-trigger:focus-visible {
  cursor: zoom-in !important;
}

.image-uploader.is-invalid,
.employee-photo-dropzone.is-invalid {
  border-color: rgba(220, 53, 69, 0.5);
}

.image-uploader__stage,
.employee-photo-preview-wrap {
  flex: 0 0 auto;
  position: relative;
}

.image-uploader__stage.is-clickable,
.employee-photo-preview-wrap.is-clickable {
  cursor: zoom-in;
}

.image-uploader__copy,
.employee-photo-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.image-uploader__copy strong,
.employee-photo-copy strong {
  color: var(--app-primary);
  font-weight: var(--app-font-weight-extra-bold);
}

.image-uploader__copy small,
.employee-photo-copy small {
  color: var(--app-text-soft);
  line-height: 1.35;
}

.image-uploader--circle,
.employee-profile-dropzone {
  width: min(100%, 258px);
  height: min(258px, 100vw - 4rem);
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0.55rem;
  border-radius: 50%;
}

.image-uploader--circle .image-uploader__stage,
.employee-profile-stage {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.98) 0%, rgba(244, 233, 219, 0.94) 100%);
  border: 1px solid rgba(109, 74, 51, 0.08);
}

.image-uploader--circle .image-uploader__stage.is-clickable,
.employee-profile-stage.is-clickable {
  cursor: zoom-in;
}

.image-uploader--circle .image-uploader__preview,
.employee-profile-stage .employee-photo-preview {
  width: 100%;
  height: 100%;
  font-size: 1.4rem;
  border-radius: 50%;
  object-fit: cover;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.12), transparent 42%),
    linear-gradient(180deg, #8a5f42 0%, #6f4a33 100%);
}

.image-uploader--circle .image-uploader__copy,
.employee-profile-copy {
  position: absolute;
  inset: auto 0 10px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.28rem;
  padding: 1.55rem 1.15rem 0.85rem;
  text-align: center;
  z-index: 1;
  background: linear-gradient(180deg, rgba(109, 74, 51, 0) 0%, rgba(109, 74, 51, 0.16) 34%, rgba(109, 74, 51, 0.82) 100%);
  border-bottom-left-radius: 50%;
  border-bottom-right-radius: 50%;
}

.image-uploader--circle .image-uploader__copy strong,
.employee-profile-copy strong {
  color: #fffaf4;
  line-height: 1.1;
}

.image-uploader--circle .image-uploader__copy small,
.employee-profile-copy small {
  max-width: 172px;
  color: rgba(255, 250, 244, 0.92);
  line-height: 1.3;
}

.image-uploader--circle.has-photo .image-uploader__copy,
[data-photo-dropzone].has-photo .employee-profile-copy {
  display: none;
}

.image-uploader--circle .image-uploader__fallback i,
.employee-avatar-fallback i {
  font-size: 1.95rem;
  transform: translateY(-18px);
}

[data-photo-dropzone].employee-photo-dropzone:not(.employee-profile-dropzone).has-photo {
  width: fit-content;
  max-width: 100%;
  min-height: 0;
  justify-content: center;
  padding: 0.6rem 0.7rem;
  gap: 0.7rem;
}

[data-photo-dropzone].employee-photo-dropzone:not(.employee-profile-dropzone).has-photo .employee-photo-preview {
  width: 108px;
  height: 108px;
}

.image-uploader--circle.has-photo,
.employee-profile-dropzone.has-photo {
  width: min(100%, 258px);
  height: min(258px, 100vw - 4rem);
  padding: 0.55rem;
}

.employee-access-layout {
  align-items: start;
  --bs-gutter-x: 1.5rem;
}

.employee-access-photo-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 0 0 300px;
  max-width: 300px;
}

.employee-access-layout .app-card-title {
  margin-bottom: 0.7rem;
}

.employee-access-fields {
  padding-top: 0.1rem;
  flex: 1 1 auto;
  min-width: 0;
  padding-left: 0.2rem;
}

.image-uploader__remove,
.photo-remove-button {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(159, 38, 52, 0.22);
  border-radius: 999px;
  background: rgba(255, 250, 244, 0.98);
  color: #9f2634;
  box-shadow: 0 10px 24px rgba(62, 42, 28, 0.12);
  z-index: 4;
}

.schedule-calendar-card {
  overflow: visible;
}

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

.schedule-calendar-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--app-border);
  border-radius: 999px;
  background: rgba(255, 250, 244, 0.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.schedule-range-button {
  min-width: 76px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--app-primary);
  font-weight: var(--app-font-weight-extra-bold);
  transition: background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.schedule-range-button:hover,
.schedule-range-button:focus {
  background: rgba(109, 74, 51, 0.08);
}

.schedule-range-button.is-active {
  background: var(--app-primary);
  color: #fffaf4;
  box-shadow: 0 10px 22px rgba(74, 45, 24, 0.16);
}

.schedule-app-shell {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

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

.schedule-create-button,
.schedule-today-button,
.schedule-icon-button,
.schedule-view-button {
  border: 1px solid var(--app-border);
  background: rgba(255, 253, 249, 0.94);
  color: var(--app-primary);
  font-weight: var(--app-font-weight-extra-bold);
  box-shadow: 0 8px 18px rgba(53, 40, 30, 0.08);
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.schedule-create-button {
  width: 100%;
  min-width: 0;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border-radius: 18px;
  font-size: 1rem;
  border-color: rgba(95, 63, 47, 0.34);
  color: #fffaf4;
  background:
    linear-gradient(135deg, #7b4e34 0%, #5f3f2f 100%);
  box-shadow: 0 14px 26px rgba(74, 45, 24, 0.18);
}

.schedule-create-button i {
  font-size: 1.3rem;
}

.schedule-today-button,
.schedule-view-button {
  height: 40px;
  padding: 0 1.1rem;
  border-radius: 999px;
}

.schedule-icon-button {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.schedule-create-button:hover,
.schedule-create-button:focus,
.schedule-today-button:hover,
.schedule-today-button:focus,
.schedule-icon-button:hover,
.schedule-icon-button:focus,
.schedule-view-button:hover,
.schedule-view-button:focus {
  border-color: rgba(109, 74, 51, 0.26);
  background: rgba(255, 250, 244, 1);
}

.schedule-create-button:hover,
.schedule-create-button:focus {
  border-color: rgba(63, 111, 101, 0.38);
  color: #fffaf4;
  background:
    linear-gradient(135deg, #3f6f65 0%, #5f3f2f 100%);
}

.schedule-view-button.is-active {
  border-color: #3f6f65;
  background: #3f6f65;
  color: #fffaf4;
}

.schedule-mini-card,
.schedule-agent-card,
.schedule-main-panel {
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-md);
  background: rgba(255, 253, 249, 0.9);
  box-shadow: 0 16px 34px rgba(65, 48, 35, 0.08);
}

.schedule-mini-card,
.schedule-agent-card {
  padding: 1rem;
}

.schedule-agent-card h2 {
  margin: 0 0 0.8rem;
  color: var(--app-primary);
  font-size: 1rem;
  font-weight: var(--app-font-weight-extra-bold);
}

.schedule-mini-card {
  background:
    radial-gradient(circle at top left, rgba(63, 111, 101, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 253, 249, 0.98) 0%, rgba(247, 238, 226, 0.96) 100%);
}

.schedule-mini-heading {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.75rem;
}

.schedule-mini-heading span {
  color: var(--app-primary);
  font-size: 1rem;
  font-weight: var(--app-font-weight-extra-bold);
}

.schedule-mini-heading small {
  color: var(--app-text-soft);
  font-size: 0.78rem;
}

.schedule-agent-list {
  display: grid;
  gap: 0.55rem;
}

.schedule-agent-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 34px;
  padding: 0.35rem 0.45rem;
  border-radius: 12px;
  color: var(--app-text);
  font-size: 0.92rem;
  font-weight: var(--app-font-weight-bold);
  background: rgba(255, 255, 255, 0.46);
}

.schedule-agent-card p {
  margin: 0;
  color: var(--app-text-soft);
}

.schedule-agent-dot {
  width: 0.75rem;
  height: 0.75rem;
  flex: 0 0 auto;
  border-radius: 999px;
}

.schedule-main-panel {
  min-width: 0;
  padding: 1rem;
  overflow: visible;
  background:
    radial-gradient(circle at top right, rgba(79, 103, 138, 0.1), transparent 30%),
    linear-gradient(180deg, rgba(255, 253, 249, 0.98) 0%, rgba(250, 243, 234, 0.92) 100%);
}

.schedule-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}

.schedule-navigation,
.schedule-view-switcher {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.schedule-navigation h1 {
  margin: 0 0 0 0.5rem;
  color: var(--app-primary);
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  font-weight: var(--app-font-weight-extra-bold);
}

.schedule-main-subtitle {
  margin: 0 0 1rem;
  color: var(--app-text-soft);
}

.schedule-scope-filter {
  margin: -0.35rem 0 1rem;
}

.schedule-scope-filter .schedule-view-switcher {
  display: inline-flex;
}

.schedule-mobile-days {
  display: none;
}

.schedule-mobile-monthbar {
  display: none;
}

.schedule-mini-calendar .fc {
  font-size: 0.78rem;
}

.schedule-mini-calendar {
  position: relative;
}

.schedule-mini-calendar .fc-toolbar {
  margin-bottom: 0.65rem !important;
  align-items: center;
}

.schedule-mini-calendar .fc-toolbar-title {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 30px;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  color: var(--app-primary);
  font-size: 0.96rem !important;
  font-weight: var(--app-font-weight-extra-bold);
  text-transform: capitalize;
  cursor: pointer;
  transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

.schedule-mini-calendar .fc-toolbar-title::after {
  content: "\F282";
  font-family: "bootstrap-icons";
  font-size: 0.74rem;
  line-height: 1;
}

.schedule-mini-calendar .fc-toolbar-title:hover,
.schedule-mini-calendar .fc-toolbar-title:focus {
  background: rgba(109, 74, 51, 0.08);
  box-shadow: inset 0 0 0 1px rgba(109, 74, 51, 0.08);
}

.schedule-mini-calendar .fc-button {
  width: 30px;
  height: 30px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.62) !important;
  color: var(--app-primary) !important;
  box-shadow: none !important;
}

.schedule-mini-calendar .fc-button:hover,
.schedule-mini-calendar .fc-button:focus {
  background: rgba(109, 74, 51, 0.1) !important;
}

.schedule-mini-calendar .fc-scrollgrid,
.schedule-mini-calendar.fc-theme-standard td,
.schedule-mini-calendar.fc-theme-standard th {
  border: 0 !important;
}

.schedule-mini-calendar .fc-day-today {
  background: transparent !important;
}

.schedule-mini-calendar .fc-daygrid-day-frame {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.schedule-mini-calendar .fc-col-header-cell-cushion {
  color: #7f6653;
  font-size: 0.7rem;
  font-weight: var(--app-font-weight-extra-bold);
  text-decoration: none;
  text-transform: uppercase;
}

.schedule-mini-calendar .fc-col-header-cell .fc-col-header-cell-cushion {
  color: #7f6653 !important;
}

.schedule-mini-calendar .fc-daygrid-day-number {
  min-width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--app-text);
  text-decoration: none;
  position: relative;
  z-index: 1;
  transition: background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, outline-color 0.16s ease;
}

.schedule-mini-calendar .fc-day-today .fc-daygrid-day-number {
  color: #3f6f65;
  background: rgba(63, 111, 101, 0.1);
  box-shadow: inset 0 0 0 1px rgba(63, 111, 101, 0.2);
}

.schedule-mini-calendar .fc-daygrid-day.is-selected .fc-daygrid-day-number {
  color: #fffaf4;
  background: #7b4e34;
  box-shadow: 0 8px 14px rgba(74, 45, 24, 0.18);
}

.schedule-mini-calendar .fc-daygrid-day.has-shifts .fc-daygrid-day-number::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 1px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #4f678a;
  transform: translateX(-50%);
}

.schedule-mini-calendar .fc-daygrid-day.fc-day-today.has-shifts .fc-daygrid-day-number::after {
  background: #3f6f65;
}

.schedule-mini-calendar .fc-daygrid-day.is-selected.has-shifts .fc-daygrid-day-number::after {
  background: #fffaf4;
}

.schedule-mini-calendar .fc-daygrid-day.fc-day-other .fc-daygrid-day-number {
  color: rgba(77, 64, 54, 0.42);
}

.schedule-mini-year-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 38px;
  z-index: 30;
  padding: 0.75rem;
  border: 1px solid rgba(109, 74, 51, 0.12);
  border-radius: 20px;
  background: rgba(255, 253, 249, 0.98);
  box-shadow: 0 18px 34px rgba(74, 45, 24, 0.16);
}

.schedule-mini-year-panel-header {
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

.schedule-mini-year-panel-header span {
  color: var(--app-primary);
  font-size: 0.85rem;
  font-weight: var(--app-font-weight-extra-bold);
  text-align: center;
}

.schedule-mini-year-panel-header button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  color: var(--app-primary);
  background: rgba(255, 255, 255, 0.72);
}

.schedule-mini-year-panel-header button:hover,
.schedule-mini-year-panel-header button:focus {
  background: rgba(109, 74, 51, 0.1);
}

.schedule-mini-year-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
}

.schedule-mini-year-option {
  min-height: 38px;
  border: 0;
  border-radius: 12px;
  color: var(--app-text);
  background: rgba(109, 74, 51, 0.04);
  font-weight: var(--app-font-weight-bold);
}

.schedule-mini-year-option:hover,
.schedule-mini-year-option:focus {
  background: rgba(109, 74, 51, 0.1);
}

.schedule-mini-year-option.is-selected {
  color: #fffaf4;
  background: #7b4e34;
  box-shadow: 0 8px 14px rgba(74, 45, 24, 0.18);
}

.schedule-mini-legend {
  display: flex;
  gap: 0.85rem;
  margin-top: 0.8rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(109, 74, 51, 0.1);
  color: var(--app-text-soft);
  font-size: 0.74rem;
  flex-wrap: wrap;
}

.schedule-mini-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.schedule-mini-legend-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  display: inline-block;
}

.schedule-mini-legend-dot--selected {
  background: #7b4e34;
}

.schedule-mini-legend-dot--busy {
  background: #4f678a;
}

.schedule-calendar {
  width: 100%;
  min-width: 0;
}

.schedule-calendar .fc {
  --fc-border-color: rgba(86, 96, 104, 0.18);
  --fc-page-bg-color: transparent;
  --fc-neutral-bg-color: rgba(255, 253, 249, 0.7);
  --fc-today-bg-color: rgba(63, 111, 101, 0.08);
  --fc-highlight-color: rgba(63, 111, 101, 0.13);
  --fc-event-bg-color: var(--app-primary);
  --fc-event-border-color: var(--app-primary);
  --fc-event-text-color: #fffaf4;
  color: var(--app-text);
}

.schedule-calendar .fc-scrollgrid {
  border: 1px solid rgba(86, 96, 104, 0.18);
  border-radius: var(--app-radius-md);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.schedule-calendar .fc-scroller {
  overflow: visible !important;
}

.schedule-calendar .fc-col-header-cell {
  background: rgba(251, 248, 244, 0.98);
}

.schedule-calendar .fc-day-today,
.schedule-calendar .fc-day-sat,
.schedule-calendar .fc-day-sun {
  background: transparent !important;
}

.schedule-calendar .fc-day-sat .fc-daygrid-day-number,
.schedule-calendar .fc-day-sun .fc-daygrid-day-number,
.schedule-calendar .fc-day-sat a,
.schedule-calendar .fc-day-sun a {
  color: inherit !important;
}

.schedule-calendar .fc-col-header-cell-cushion {
  display: block;
  padding: 0.85rem 0.5rem;
  color: var(--app-primary) !important;
  font-weight: var(--app-font-weight-extra-bold);
  text-transform: capitalize;
  text-decoration: none;
}

.schedule-calendar-day-header {
  min-height: 42px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.18rem;
  line-height: 1;
}

.schedule-calendar-day-header span {
  font-size: 0.82rem;
  text-transform: capitalize;
}

.schedule-calendar-day-header strong {
  min-width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--app-text);
  font-size: 1rem;
  font-weight: var(--app-font-weight-extra-bold);
  background: rgba(109, 74, 51, 0.06);
}

.schedule-calendar .fc-timegrid-slot {
  height: 1.75rem;
}

.schedule-calendar .fc-timegrid-slot-minor {
  border-top-style: dotted;
}

.schedule-calendar .fc-timegrid-col {
  background: rgba(255, 255, 255, 0.44);
}

.schedule-calendar .fc-timegrid-col-frame {
  transition: background-color 0.16s ease;
}

.schedule-calendar .fc-timegrid-col-frame:hover {
  background: rgba(63, 111, 101, 0.035);
}

.schedule-calendar .fc-timegrid-slot-label-cushion {
  color: var(--app-text-soft);
  font-size: 0.76rem;
  font-weight: var(--app-font-weight-bold);
}

.schedule-calendar .fc-timegrid-event {
  border: 0;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(42, 50, 56, 0.14);
  cursor: pointer;
  outline: 1px solid rgba(255, 250, 244, 0.56);
  overflow: hidden;
}

.schedule-calendar .fc-timegrid-event:hover,
.schedule-calendar .fc-timegrid-event:focus {
  filter: brightness(0.98);
  box-shadow: 0 12px 24px rgba(42, 50, 56, 0.2);
}

.schedule-calendar .fc-event-main {
  padding: 0.3rem 0.4rem;
}

.schedule-calendar .fc-daygrid-event {
  border: 0;
  border-radius: 7px;
  color: #fffaf4 !important;
  box-shadow: 0 5px 12px rgba(42, 50, 56, 0.1);
  overflow: hidden;
}

.schedule-calendar .fc-daygrid-dot-event {
  padding: 0;
}

.schedule-calendar .fc-daygrid-event .fc-event-main {
  color: #fffaf4 !important;
}

.schedule-calendar .fc-daygrid-event .schedule-event-content {
  gap: 0;
  padding: 0.12rem 0.2rem;
}

.schedule-calendar .fc-daygrid-event .schedule-event-content strong,
.schedule-calendar .fc-daygrid-event .schedule-event-content span,
.schedule-calendar .fc-daygrid-event .schedule-event-content small {
  color: inherit;
}

.schedule-calendar .fc-daygrid-event .schedule-event-content strong {
  font-size: 0.73rem;
}

.schedule-calendar .fc-daygrid-event .schedule-event-content span,
.schedule-calendar .fc-daygrid-event .schedule-event-content small {
  font-size: 0.65rem;
}

.schedule-event-color-1,
.schedule-calendar .schedule-event-color-1 {
  background: #3f6f65;
}

.schedule-event-color-2,
.schedule-calendar .schedule-event-color-2 {
  background: #4f678a;
}

.schedule-event-color-3,
.schedule-calendar .schedule-event-color-3 {
  background: #8b4d5f;
}

.schedule-event-color-4,
.schedule-calendar .schedule-event-color-4 {
  background: #6b5b95;
}

.schedule-event-color-5,
.schedule-calendar .schedule-event-color-5 {
  background: #7b4e34;
}

.schedule-event-color-6,
.schedule-calendar .schedule-event-color-6 {
  background: #78633f;
}

.schedule-event-content {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
  line-height: 1.16;
}

.schedule-event-content strong,
.schedule-event-content span,
.schedule-event-content small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-event-content strong {
  font-size: 0.82rem;
  font-weight: var(--app-font-weight-extra-bold);
}

.schedule-event-content span,
.schedule-event-content small {
  font-size: 0.7rem;
}

.schedule-delete-confirmation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding: 0.9rem;
  border: 1px solid rgba(159, 38, 52, 0.2);
  border-radius: var(--app-radius-sm);
  background: rgba(255, 246, 244, 0.9);
}

.schedule-delete-confirmation strong,
.schedule-delete-confirmation span {
  display: block;
}

.schedule-delete-confirmation strong {
  color: #7b1d29;
  font-weight: var(--app-font-weight-extra-bold);
}

.schedule-delete-confirmation span {
  color: var(--app-text-soft);
  font-size: 0.9rem;
}

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

.schedule-modal {
  overflow: visible;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-md);
  background: var(--app-surface);
  box-shadow: var(--app-shadow-md);
}

.schedule-modal .modal-header,
.schedule-modal .modal-footer {
  border-color: var(--app-border);
  background: rgba(255, 250, 244, 0.72);
}

.schedule-modal .modal-title {
  color: var(--app-primary);
  font-weight: var(--app-font-weight-extra-bold);
}

.schedule-modal-subtitle {
  margin: 0.15rem 0 0;
  color: var(--app-text-soft);
}

.schedule-modal-date {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(109, 74, 51, 0.12);
  border-radius: var(--app-radius-sm);
  color: var(--app-text);
  background:
    linear-gradient(135deg, rgba(255, 253, 249, 0.96) 0%, rgba(247, 238, 226, 0.92) 100%);
}

.schedule-modal-date-copy {
  flex: 1 1 220px;
  min-width: 0;
}

.schedule-modal-date-control {
  flex: 0 0 210px;
}

.schedule-modal-date-control .app-date-picker__panel {
  left: auto;
  right: 0;
}

.schedule-modal-date span,
.schedule-modal-date strong {
  display: block;
}

.schedule-modal-date span {
  color: var(--app-text-soft);
  font-size: 0.76rem;
  font-weight: var(--app-font-weight-extra-bold);
  text-transform: uppercase;
}

.schedule-modal-date strong {
  color: var(--app-primary);
  font-size: 1rem;
  font-weight: var(--app-font-weight-extra-bold);
}

.schedule-modal-footer {
  gap: 0.6rem;
}

.schedule-modal-footer .btn {
  min-width: 178px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 1199.98px) {
  .image-uploader--circle,
  .employee-profile-dropzone,
  .employee-profile-dropzone.has-photo {
    width: min(100%, 258px);
    height: min(258px, 100vw - 4rem);
  }

  .employee-access-photo-col {
    flex-basis: auto;
    max-width: none;
  }

  .schedule-calendar {
    min-width: 0;
  }
}

.image-uploader__remove:hover,
.image-uploader__remove:focus,
.photo-remove-button:hover,
.photo-remove-button:focus {
  background: rgba(220, 53, 69, 0.1);
  border-color: rgba(220, 53, 69, 0.22);
  color: #7b1d29;
}

.image-uploader__remove i,
.photo-remove-button i {
  font-size: 0.8rem;
}

.image-uploader--rounded .image-uploader__fallback,
.product-photo-fallback {
  border-radius: 22px;
}

.image-uploader--rounded,
[data-product-photo-dropzone] {
  width: min(100%, 312px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0.55rem;
}

.image-uploader--rounded:hover,
.image-uploader--rounded.dragging,
[data-product-photo-dropzone]:hover,
[data-product-photo-dropzone].dragging {
  transform: none;
}

.image-uploader--rounded .image-uploader__stage,
.product-image-stage {
  width: 100%;
  min-width: 100%;
  flex: 0 0 auto;
  aspect-ratio: 5 / 4;
  position: relative;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.98) 0%, rgba(244, 233, 219, 0.94) 100%);
  border: 1px solid rgba(109, 74, 51, 0.08);
}

.image-uploader--rounded .image-uploader__stage.is-clickable,
.product-image-stage.is-clickable {
  cursor: zoom-in;
}

.image-uploader--rounded .image-uploader__copy,
.product-image-copy {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.22rem;
  padding: 2.9rem 1rem 1rem;
  z-index: 1;
  background: linear-gradient(180deg, rgba(109, 74, 51, 0) 0%, rgba(109, 74, 51, 0.16) 34%, rgba(109, 74, 51, 0.82) 100%);
}

.image-uploader--rounded .image-uploader__copy strong,
.product-image-copy strong {
  font-size: 1rem;
  color: #fffaf4;
}

.product-image-hint {
  font-size: 0.74rem;
  opacity: 0.92;
}

.image-uploader--rounded .image-uploader__copy small,
.product-image-copy small {
  max-width: 200px;
  color: rgba(255, 250, 244, 0.92);
  line-height: 1.35;
}

.product-photo-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  font-size: 2rem;
  font-family: inherit;
  font-weight: var(--app-font-weight-extra-bold);
  letter-spacing: 0;
  color: rgba(255, 250, 244, 0.9);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.12), transparent 42%),
    linear-gradient(180deg, #8a5f42 0%, #6f4a33 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 250, 244, 0.06);
}

.image-uploader--rounded .image-uploader__fallback i,
.product-photo-fallback i {
  font-size: 2rem;
  transform: translateY(-36px);
}

.image-uploader--rounded .image-uploader__preview,
[data-product-photo-dropzone] .product-photo-preview {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.image-uploader--rounded.has-photo .image-uploader__stage,
[data-product-photo-dropzone].has-photo .product-image-stage {
  width: 100%;
  min-width: 100%;
  aspect-ratio: 5 / 4;
}

.image-uploader--rounded.has-photo .image-uploader__copy,
[data-product-photo-dropzone].has-photo .product-image-copy {
  display: none;
}

.image-uploader--rounded.has-photo .image-uploader__preview,
.image-uploader--rounded.has-photo .image-uploader__fallback,
[data-product-photo-dropzone].has-photo .product-photo-preview,
[data-product-photo-dropzone].has-photo .product-photo-fallback {
  width: 100%;
  height: 100%;
}

.product-summary-fields .field-static,
.product-summary-fields .field-highlight {
  min-height: 48px;
}

@media (max-width: 991.98px) {
  .product-form-layout .app-card-subtitle {
    max-width: none;
  }

  .image-uploader--rounded,
  [data-product-photo-dropzone] {
    width: min(100%, 312px);
  }

  .product-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1399.98px) {
  .image-uploader--rounded,
  [data-product-photo-dropzone] {
    width: min(100%, 340px);
  }
}

@media (min-width: 992px) {
  .product-form-layout {
    display: flex;
    flex-wrap: nowrap;
    gap: 1.4rem;
  }

  .product-form-layout > [class*="col-"] {
    margin-bottom: 0;
  }

  .product-form-media-col {
    flex: 0 0 340px;
    max-width: 340px;
  }

  .product-form-fields-col {
    flex: 1 1 auto;
    min-width: 0;
  }

  .image-uploader--rounded,
  [data-product-photo-dropzone] {
    width: 100%;
  }
}

.image-uploader--rounded .image-uploader__copy strong,
[data-product-photo-dropzone] .employee-photo-copy strong {
  font-size: 1rem;
}

.image-uploader--rounded .image-uploader__copy small,
[data-product-photo-dropzone] .employee-photo-copy small {
  max-width: 220px;
}

.app-image-preview-modal {
  overflow: hidden;
  background: var(--app-surface-soft);
  border: 1px solid var(--app-border);
  border-radius: 20px;
  box-shadow: var(--app-shadow-md);
}

.app-image-preview-modal .modal-header {
  background: rgba(255, 250, 244, 0.66);
  border-color: var(--app-border);
}

.app-image-preview-modal .modal-title {
  color: var(--app-primary);
  font-weight: var(--app-font-weight-extra-bold);
}

.image-preview-heading {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.image-preview-subtitle {
  margin: 0;
  color: var(--app-text-soft);
  font-size: 0.88rem;
}

.app-image-preview-modal .modal-body {
  padding: 1rem;
}

.image-preview-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  padding: 1rem;
  border-radius: 20px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.22), transparent 42%),
    linear-gradient(180deg, rgba(255, 252, 247, 0.96) 0%, rgba(241, 228, 209, 0.92) 100%);
  border: 1px solid rgba(109, 74, 51, 0.08);
}

.image-preview-stage img {
  max-width: 100%;
  max-height: 72vh;
  border-radius: 20px;
  object-fit: contain;
  box-shadow: 0 18px 40px rgba(62, 42, 28, 0.12);
}

[data-document-number]:disabled {
  background: #eee5d8;
  border-color: rgba(109, 74, 51, 0.14);
  color: var(--app-text-soft);
  cursor: not-allowed;
  opacity: 0.78;
}

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

.role-option {
  cursor: pointer;
}

.role-option .role-toggle {
  margin: 0;
  cursor: pointer;
}

.role-option .role-toggle:focus {
  box-shadow: 0 0 0 0.18rem rgba(109, 74, 51, 0.12) !important;
}

.role-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.role-badge {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.62rem;
  border-radius: var(--app-radius-pill);
  background: rgba(109, 74, 51, 0.1);
  border: 1px solid rgba(109, 74, 51, 0.16);
  color: var(--app-primary);
  font-size: 0.78rem;
  font-weight: var(--app-font-weight-bold);
  white-space: nowrap;
}

.user-info {
  max-width: 160px;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  vertical-align: top;
  line-height: 15px;
  position: relative;
  top: 4px;
  color: #ffffff;
  font-size: 14px;
}

.user-info small {
  display: block;
}

.img-4em {
  height: 4em;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
}

.ocultar-mobile {
  display: inline-flex;
}

@media (max-width: 991.98px) {
  .schedule-app-shell {
    grid-template-columns: 1fr;
  }

  .schedule-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }

  .schedule-create-button {
    grid-column: 1 / -1;
  }

  .sidebar {
    display: none !important;
  }

  main.main-content.layout-wrapper {
    margin-left: 0;
    padding: 1.1rem 0.9rem 2rem;
  }

  .app-page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .switch-box {
    min-height: auto;
    padding-bottom: 0;
  }

  .facturar-card,
  .invoice-card {
    padding: 0.75rem 0.85rem;
  }

  .table-filters {
    grid-template-columns: 1fr 1fr;
  }

  .statistics-filters-grid,
  .statistics-layout {
    grid-template-columns: 1fr;
  }

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

  .filter-search {
    grid-column: 1 / -1;
  }

  .ocultar-mobile {
    display: none !important;
  }

  .sales-entry-layout {
    grid-template-columns: 1fr;
  }

  .sales-entry-summary {
    align-self: stretch;
  }

  .sales-summary-card.is-fixed {
    max-height: none;
    overflow: visible;
    width: auto !important;
    left: auto !important;
  }

  .schedule-calendar {
    min-width: 0;
  }
}

@media (max-width: 767.98px) {
  .schedule-sidebar {
    display: block;
  }

  .schedule-mini-card,
  .schedule-agent-card {
    display: none;
  }

  .schedule-create-button {
    margin-bottom: 0.85rem;
  }

  .schedule-main-panel {
    padding: 0.85rem;
    border-radius: 20px;
  }

  .schedule-topbar {
    align-items: flex-start;
    gap: 0.65rem;
  }

  .schedule-navigation {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.45rem;
  }

  .schedule-navigation [data-schedule-prev],
  .schedule-navigation [data-schedule-next] {
    display: none;
  }

  .schedule-navigation h1 {
    margin: 0;
    align-self: center;
    font-size: 1.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .schedule-view-switcher {
    display: none;
  }

  .schedule-scope-filter .schedule-view-switcher {
    display: flex;
  }

  .schedule-main-subtitle {
    margin-bottom: 0.75rem;
    font-size: 0.88rem;
  }

  .schedule-mobile-monthbar {
    position: relative;
    z-index: 8;
    display: block;
    margin: 0 0 0.55rem;
  }

  .schedule-mobile-month-toggle {
    min-height: 46px;
    width: 100%;
    border: 1px solid rgba(109, 74, 51, 0.14);
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0.85rem;
    color: var(--app-primary);
    background: rgba(255, 253, 249, 0.86);
    font-weight: var(--app-font-weight-extra-bold);
    text-transform: capitalize;
    box-shadow: 0 10px 22px rgba(74, 45, 24, 0.08);
  }

  .schedule-mobile-month-toggle i {
    font-size: 0.95rem;
    transition: transform 0.16s ease;
  }

  .schedule-mobile-month-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
  }

  .schedule-mobile-month-picker {
    position: absolute;
    left: 0;
    top: calc(100% + 0.45rem);
    width: min(100%, 330px);
    padding: 0.8rem;
    border: 1px solid rgba(109, 74, 51, 0.12);
    border-radius: 20px;
    background: rgba(255, 253, 249, 0.98);
    box-shadow: 0 20px 40px rgba(74, 45, 24, 0.18);
  }

  .schedule-mobile-mini-calendar .fc-toolbar {
    margin-bottom: 0.45rem !important;
  }

  .schedule-mobile-days {
    display: flex;
    gap: 0.35rem;
    margin: 0 0 0.75rem;
    padding: 0.45rem;
    border: 1px solid rgba(109, 74, 51, 0.1);
    border-radius: 18px;
    background: rgba(255, 253, 249, 0.72);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .schedule-mobile-days::-webkit-scrollbar {
    display: none;
  }

  .schedule-mobile-day {
    position: relative;
    flex: 0 0 58px;
    min-height: 58px;
    border: 0;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.18rem;
    color: var(--app-text-soft);
    background: transparent;
    font-weight: var(--app-font-weight-bold);
    scroll-snap-align: center;
  }

  .schedule-mobile-day span {
    font-size: 0.68rem;
    line-height: 1;
    text-transform: uppercase;
  }

  .schedule-mobile-day strong {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--app-text);
    font-size: 0.95rem;
    font-weight: var(--app-font-weight-extra-bold);
  }

  .schedule-mobile-day.is-today strong {
    color: #3f6f65;
    background: rgba(63, 111, 101, 0.1);
    box-shadow: inset 0 0 0 1px rgba(63, 111, 101, 0.2);
  }

  .schedule-mobile-day.is-selected strong {
    color: #fffaf4;
    background: #7b4e34;
    box-shadow: 0 8px 14px rgba(74, 45, 24, 0.18);
  }

  .schedule-mobile-day.has-shifts::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 7px;
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: #4f678a;
    transform: translateX(-50%);
  }

  .schedule-mobile-day.is-selected.has-shifts::after {
    background: #fffaf4;
  }

  .schedule-calendar .fc-col-header-cell-cushion {
    padding: 0.65rem 0.35rem;
  }

  .schedule-calendar .fc-timegrid-slot {
    height: 2rem;
  }

  .schedule-modal-date {
    align-items: stretch;
    flex-direction: column;
  }

  .schedule-modal-date-control {
    flex: 1 1 auto;
  }

  .schedule-modal-date-control .app-date-picker__panel {
    left: 0;
    right: auto;
  }

  .schedule-modal-footer .btn {
    flex: 1 1 100%;
  }

  .schedule-topbar,
  .schedule-navigation,
  .schedule-view-switcher {
    align-items: stretch;
  }

  .schedule-view-button,
  .schedule-today-button {
    flex: 1 1 0;
  }

  .app-card {
    padding: 1rem;
  }

  .app-panel-switcher {
    width: 100%;
    justify-content: stretch;
  }

  .app-panel-switcher .btn {
    flex: 1 1 0;
    padding-inline: 0.75rem;
  }

  .table tbody td,
  .table thead th {
    padding-inline: 0.7rem;
  }

  .table-filters {
    grid-template-columns: 1fr;
  }

  .filter-search {
    grid-column: auto;
  }

  .table-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-summary-grid {
    grid-template-columns: 1fr;
  }

  .sales-summary-grid {
    grid-template-columns: 1fr;
  }

  .statistics-metrics {
    grid-template-columns: 1fr;
  }

  .statistics-bar-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    padding: 0.65rem 0;
  }

  .statistics-bar-row strong,
  .statistics-bar-row small {
    justify-self: start;
  }

  .app-readonly-grid {
    grid-template-columns: 1fr;
  }

  .schedule-calendar-card {
    overflow: visible;
  }

  .btn-save {
    width: 100%;
  }

  .overtime-show-actions .btn-save {
    width: auto;
  }
}
