:root {
  --admin-sidebar-width: 284px;
  --admin-header-height: 74px;
}
html.admin-sidebar-collapsed {
  --admin-sidebar-width: 88px;
}
body {
  margin: 0;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 14px;
  line-height: 1.45;
  background: #f3f4f6;
  color: #111827;
}
body.login-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 32px 20px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 32%),
    radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.14), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #eef2f7 100%);
}
.login-shell {
  width: min(1040px, 100%);
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(360px, 480px);
  gap: 28px;
  align-items: center;
}
.login-branding {
  padding: 28px 12px;
}
.login-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.login-branding h1 {
  margin: 18px 0 12px;
  font-size: clamp(2.3rem, 5vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: #0f172a;
}
.login-branding p {
  margin: 0;
  max-width: 34rem;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #475569;
}
.login-card {
  width: min(420px, 100%);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(14px);
}
.login-card-header {
  margin-bottom: 26px;
}
.login-badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 16px;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #dbeafe 0%, #e0f2fe 100%);
  color: #075985;
  font-size: 0.88rem;
  font-weight: 700;
}
.login-card h2 {
  margin: 0 0 10px;
  font-size: 2rem;
  color: #0f172a;
}
.login-card-header p {
  margin: 0;
  color: #475569;
  line-height: 1.6;
}
label {
  display: block;
  margin-bottom: 16px;
  font-weight: 600;
  color: #374151;
}
label input,
label select,
label textarea {
  width: 100%;
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #fff;
  font-size: 0.95rem;
  font-family: inherit;
}
label textarea {
  min-height: 130px;
  resize: vertical;
}
label select[multiple],
.multi-select {
  min-height: 180px;
}
.company-picker-field {
  margin: 0;
  padding: 16px;
  border: 1px solid #d1d5db;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.company-picker-field legend {
  padding: 0 8px;
  color: #374151;
  font-size: 0.95rem;
  font-weight: 700;
}
.company-picker-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.company-picker-search {
  flex: 1 1 260px;
  min-width: 220px;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #fff;
  font-size: 0.95rem;
}
.company-picker-clear {
  padding: 0.75rem 1rem;
}
.company-picker-summary {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
}
.company-picker-count {
  display: block;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1d4ed8;
}
.company-picker-selected {
  margin-top: 8px;
  color: #1f2937;
  font-size: 0.94rem;
  line-height: 1.5;
}
.company-picker-selected.is-empty {
  color: #6b7280;
}
.company-picker-list {
  margin-top: 14px;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
}
.company-picker-option {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0;
  padding: 12px 14px;
  border-top: 1px solid #f3f4f6;
  font-weight: 600;
  color: #111827;
  cursor: pointer;
  transition: background 0.16s ease;
}
.company-picker-option:first-child {
  border-top: 0;
}
.company-picker-option:hover {
  background: #f8fafc;
}
.company-picker-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #2563eb;
  flex-shrink: 0;
}
.company-picker-option.is-hidden {
  display: none;
}
.company-picker-empty {
  padding: 14px;
  color: #6b7280;
  text-align: center;
  font-size: 0.92rem;
}
.field-hint {
  display: inline-block;
  margin-top: 8px;
  color: #6b7280;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.5;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border: none;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
button:hover,
.button:hover {
  background: #1d4ed8;
}
.button.secondary {
  background: #e5e7eb;
  color: #111827;
}
.app-loader {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  background: rgba(248, 250, 252, 0.78);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.16s ease,
    visibility 0.16s ease;
}
.app-loader[hidden] {
  display: none !important;
}
.app-loader.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.app-loader-panel {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 180px;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
}
.app-loader-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #bfdbfe;
  border-top-color: #2563eb;
  border-radius: 50%;
  flex: 0 0 auto;
  animation: appLoaderSpin 0.75s linear infinite;
}
.app-loader-text {
  color: #111827;
  font-size: 0.95rem;
  font-weight: 800;
}
@keyframes appLoaderSpin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .app-loader {
    transition: none;
  }
  .app-loader-spinner {
    animation: none;
  }
}
.app-header {
  background: #111827;
  color: #fff;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.app-header .brand {
  font-size: 1.1rem;
  font-weight: 700;
}
.app-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.app-header a {
  color: #d1d5db;
  text-decoration: none;
}
.header-company {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  color: #e2e8f0;
  font-size: 0.9rem;
  font-weight: 700;
}
.header-profile-link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 0.7rem 0.45rem 0.45rem;
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.header-profile-link:hover {
  background: rgba(148, 163, 184, 0.14);
  transform: translateY(-1px);
}
.notification-toggle {
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 0.52rem 0.82rem;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
}
.notification-toggle:hover,
.notification-toggle.is-enabled {
  background: #fff;
  color: #1d4ed8;
}
.notification-toggle:disabled {
  cursor: wait;
  opacity: 0.7;
}
.header-profile-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
  flex-shrink: 0;
}
.header-profile-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.header-profile-name {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.1;
}
.header-profile-username {
  color: #94a3b8;
  font-size: 0.85rem;
  line-height: 1.1;
}
.app-header a.button.small {
  padding: 0.55rem 0.9rem;
}
.page.shell {
  padding: 24px;
}
.panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}
.small-panel {
  max-width: 820px;
  margin: 0 auto;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 20px;
}
.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: flex-end;
}
.profile-hero {
  margin-bottom: 20px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(14, 165, 233, 0.03)),
    #fff;
}
.profile-kicker {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.8rem;
  margin-bottom: 12px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.profile-grid {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 20px;
}
.profile-summary,
.profile-security {
  height: 100%;
}
.profile-summary h3,
.profile-security h3 {
  margin-top: 0;
  margin-bottom: 18px;
}
.profile-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
}
.profile-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: #111827;
}
.profile-subtitle {
  margin-top: 4px;
  color: #6b7280;
}
.profile-list {
  margin: 0;
}
.profile-list div {
  padding: 14px 0;
  border-top: 1px solid #e5e7eb;
}
.profile-list div:first-child {
  border-top: 0;
  padding-top: 0;
}
.profile-list dt {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 6px;
}
.profile-list dd {
  margin: 0;
  color: #111827;
  font-weight: 600;
}
.profile-note {
  margin-top: 0;
  margin-bottom: 18px;
  color: #6b7280;
}
.dashboard-panel {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(14, 165, 233, 0.03)),
    #fff;
}
.admin-layout {
  display: grid;
  grid-template-columns: var(--admin-sidebar-width) minmax(0, 1fr);
  align-items: stretch;
  min-height: calc(100vh - var(--admin-header-height));
  background: #f3f7fd;
  transition: grid-template-columns 0.2s ease;
}
.admin-sidebar {
  box-sizing: border-box;
  position: relative;
  width: var(--admin-sidebar-width);
  min-height: calc(100vh - var(--admin-header-height));
  padding: 26px 14px;
  border-right: 1px solid #d9e2ef;
  background: #fff;
  transition: width 0.2s ease;
}
.admin-sidebar-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  flex: 0 0 auto;
}
.admin-sidebar-logo img {
  width: 36px;
  height: 36px;
  display: block;
}
.admin-sidebar-menu-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  margin: 0 0 18px;
}
.admin-sidebar-section-label {
  margin: 0;
  color: #8190a6;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.admin-sidebar-nav {
  display: grid;
  gap: 0.45rem;
}
.admin-sidebar-link {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 48px;
  padding: 0.62rem 0.85rem;
  border-radius: 8px;
  color: #1e2d4a;
  font-size: 0.92rem;
  font-weight: 750;
  text-decoration: none;
}
.admin-sidebar-link:hover,
.admin-sidebar-link.is-active {
  background: #eaf1ff;
  color: #2457ff;
}
.admin-sidebar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #71809a;
  flex: 0 0 auto;
}
.admin-sidebar-icon svg,
.admin-sidebar-chevron svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.admin-sidebar-link.is-active .admin-sidebar-icon,
.admin-sidebar-link:hover .admin-sidebar-icon {
  color: #2457ff;
}
.admin-sidebar-group {
  width: 100%;
  min-width: 0;
  border-radius: 8px;
}
.admin-sidebar-group summary {
  cursor: pointer;
  list-style: none;
}
.admin-sidebar-group summary::-webkit-details-marker {
  display: none;
}
.admin-sidebar-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1e2d4a;
  transition: transform 0.2s ease;
}
.admin-sidebar-chevron svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}
.admin-sidebar-group[open] .admin-sidebar-chevron {
  transform: rotate(180deg);
}
.admin-sidebar-submenu {
  display: grid;
  gap: 0.25rem;
  padding: 0.35rem 0 0.55rem 3.6rem;
}
.admin-sidebar-sublink {
  display: block;
  padding: 0.48rem 0.65rem;
  border-radius: 7px;
  color: #526178;
  font-size: 0.86rem;
  font-weight: 650;
  text-decoration: none;
}
.admin-sidebar-sublink:hover,
.admin-sidebar-sublink:focus-visible,
.admin-sidebar-sublink.is-active {
  background: #f1f5ff;
  color: #2457ff;
  outline: none;
}
.admin-sidebar-sublink.is-active {
  font-weight: 800;
  box-shadow: inset 3px 0 0 #2457ff;
}
.admin-main {
  width: 100%;
  max-width: none;
  padding: 22px;
}
.admin-sidebar ~ main.page.shell {
  box-sizing: border-box;
  width: auto;
  max-width: none;
  margin-left: 0;
  padding: 32px 24px;
}
.admin-sidebar ~ main.page.shell .panel {
  border-radius: 16px;
  min-width: 0;
}
.admin-topbar {
  min-height: var(--admin-header-height);
  padding: 12px 24px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  background: #111827;
  color: #fff;
  box-shadow: none;
  transition:
    margin-left 0.2s ease,
    width 0.2s ease;
}
.admin-topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 228px;
  color: #fff;
  text-decoration: none;
  font-size: 1.18rem;
  font-weight: 800;
}
.admin-topbar-left,
.admin-topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}
.admin-sidebar-toggle,
.admin-topbar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #fff;
  color: #66748b;
  cursor: pointer;
}
.admin-sidebar-toggle {
  flex-direction: column;
  gap: 4px;
}
.admin-sidebar-toggle span {
  display: block;
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}
.admin-command-search {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  width: min(430px, 42vw);
  min-height: 44px;
  padding: 0 0.8rem;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #fff;
  color: #66748b;
}
.admin-command-search > span {
  font-size: 0.78rem;
  font-weight: 750;
}
.admin-command-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #1f2937;
  font: inherit;
}
.admin-command-search kbd {
  padding: 0.18rem 0.42rem;
  border: 1px solid #dbe4f0;
  border-radius: 7px;
  background: #f8fafc;
  color: #66748b;
  font: inherit;
  font-size: 0.76rem;
}
.admin-topbar .notification-toggle {
  padding: 0.52rem 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.admin-topbar .notification-toggle:hover,
.admin-topbar .notification-toggle.is-enabled {
  background: #fff;
  color: #1d4ed8;
}
.admin-profile-link {
  color: #d1d5db;
}
.admin-profile-link .header-profile-name {
  color: #fff;
}
.admin-profile-link .header-profile-username {
  color: #cbd5e1;
}
html.admin-sidebar-collapsed .admin-sidebar {
  padding-inline: 14px;
}
html.admin-sidebar-collapsed .admin-sidebar-menu-header {
  justify-content: center;
  margin-bottom: 16px;
}
html.admin-sidebar-collapsed .admin-sidebar-link span:not(.admin-sidebar-icon):not(.admin-sidebar-chevron),
html.admin-sidebar-collapsed .admin-sidebar-chevron,
html.admin-sidebar-collapsed .admin-sidebar-submenu {
  display: none;
}
html.admin-sidebar-collapsed .admin-sidebar-section-label {
  display: none;
}
html.admin-sidebar-collapsed .admin-sidebar-nav {
  justify-items: center;
}
html.admin-sidebar-collapsed .admin-sidebar-link {
  display: flex;
  justify-content: center;
  width: 48px;
  min-height: 48px;
  padding: 0;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  align-items: stretch;
}
.dashboard-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 220px;
  padding: 22px;
  border: 1px solid #dbe4f0;
  border-radius: 20px;
  color: inherit;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}
a.dashboard-card,
a.dashboard-card:visited {
  text-decoration: none;
  color: inherit;
}
a.dashboard-card:hover,
a.dashboard-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 18px 30px rgba(37, 99, 235, 0.12);
  border-color: #93c5fd;
  outline: none;
}
.dashboard-card-disabled {
  border-style: dashed;
  background: linear-gradient(180deg, #f8fbff 0%, #f1f5f9 100%);
  box-shadow: none;
  cursor: default;
}
.dashboard-card-badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #e2e8f0 0%, #f8fafc 100%);
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.dashboard-card-top {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.dashboard-card-count {
  font-size: 2rem;
  font-weight: 800;
  color: #1d4ed8;
  line-height: 1;
  text-decoration: none;
}
.dashboard-card-count-label {
  color: #6b7280;
  font-size: 0.95rem;
  text-transform: capitalize;
  text-decoration: none;
}
.dashboard-card-body {
  flex: 1;
}
.dashboard-card h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  color: #111827;
  text-decoration: none;
}
.dashboard-card p {
  margin: 0;
  color: #4b5563;
  line-height: 1.5;
  text-decoration: none;
}
.dashboard-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #2563eb;
  font-weight: 700;
  text-decoration: none;
}
.dashboard-card-link::after {
  content: "\2192";
  font-size: 1rem;
}
.dashboard-card-disabled .dashboard-card-link {
  color: #64748b;
}
.dashboard-card-disabled .dashboard-card-link::after {
  content: "";
}
.dashboard-card * {
  text-decoration: none;
}
.statistics-grid {
  display: grid;
  gap: 32px;
}
.statistics-section {
  min-width: 0;
  padding-top: 4px;
}
.statistics-section + .statistics-section {
  padding-top: 28px;
  border-top: 1px solid #e5e7eb;
}
.statistics-section-header {
  margin-bottom: 14px;
}
.statistics-section-header h3 {
  margin: 4px 0 0;
  color: #0f172a;
  font-size: 1.35rem;
}
.statistics-view-label {
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.statistics-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.statistics-summary {
  padding: 18px;
  border: 1px solid #dbe4f0;
  border-radius: 16px;
  background: #f8fbff;
}
.statistics-summary-value,
.statistics-summary-label {
  display: block;
}
.statistics-summary-value {
  color: #1d4ed8;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.2;
}
.statistics-summary-label {
  margin-top: 6px;
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 700;
}
.statistics-chart {
  margin-bottom: 24px;
  padding: 20px;
  border: 1px solid #dbe4f0;
  border-radius: 16px;
  background: #fff;
}
.statistics-chart-header {
  margin-bottom: 18px;
}
.statistics-chart-header h4 {
  margin: 0;
  color: #111827;
  font-size: 1rem;
}
.statistics-chart-header p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 0.85rem;
}
.statistics-chart-total {
  color: #1f2937 !important;
  font-weight: 700;
}
.statistics-chart-total strong {
  color: #1d4ed8;
}
.statistics-chart-scroll {
  overflow-x: auto;
  padding: 4px 2px 8px;
}
.statistics-chart-plot {
  display: grid;
  grid-template-columns: repeat(var(--chart-columns), minmax(74px, 1fr));
  align-items: end;
  gap: 12px;
  min-width: calc(var(--chart-columns) * 86px);
  min-height: 245px;
  padding: 10px 8px 0;
  border-bottom: 1px solid #cbd5e1;
}
.statistics-chart-plot.is-dense {
  grid-template-columns: repeat(var(--chart-columns), minmax(24px, 1fr));
  gap: 2px;
  min-width: calc(var(--chart-columns) * 26px);
  padding-right: 2px;
  padding-left: 2px;
}
.statistics-chart-column {
  display: grid;
  grid-template-rows: 192px 42px;
  align-items: end;
  min-width: 0;
  text-align: center;
}
.statistics-chart-value {
  position: absolute;
  right: 0;
  bottom: calc(var(--bar-height) + 5px);
  left: 0;
  color: #1d4ed8;
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1;
}
.statistics-chart-plot.is-dense .statistics-chart-column {
  grid-template-rows: 192px 28px;
}
.statistics-chart-plot.is-dense .statistics-chart-value {
  bottom: calc(var(--bar-height) + 3px);
  font-size: 0.68rem;
}
.statistics-chart-track {
  position: relative;
  height: 170px;
}
.statistics-chart-bar {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: min(48px, 72%);
  height: var(--bar-height);
  min-height: 0;
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(
    180deg,
    var(--bar-top-color) 0%,
    var(--bar-bottom-color) 100%
  );
  box-shadow: 0 7px 14px rgba(37, 99, 235, 0.18);
  transform: translateX(-50%);
}
.statistics-chart-plot.is-dense .statistics-chart-bar {
  width: min(14px, 90%);
  border-radius: 4px 4px 1px 1px;
  box-shadow: 0 5px 10px rgba(37, 99, 235, 0.14);
}
.statistics-chart-company {
  align-self: start;
  display: -webkit-box;
  overflow: hidden;
  color: #475569;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.statistics-chart-plot.is-dense .statistics-chart-company {
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1.1;
  -webkit-line-clamp: 2;
}
.statistics-table-actions {
  margin-bottom: 0;
}
.statistics-filter {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0;
}
.statistics-filter label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  color: #374151;
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
}
.statistics-filter input[type="date"],
.statistics-filter input[type="month"],
.statistics-filter select {
  width: 155px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
}
.statistics-filter select {
  width: min(230px, 100%);
}
.statistics-filter .button,
.statistics-filter button {
  padding: 0.68rem 1rem;
  border-radius: 999px;
  white-space: nowrap;
}
.statistics-section .data-table th,
.statistics-section .data-table td {
  padding: 9px 12px;
}
.dt-container {
  margin-top: 12px;
  max-width: 100%;
  min-width: 0;
}
.dt-container .dt-layout-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 16px;
  max-width: 100%;
  min-width: 0;
}
.dt-container .dt-layout-row.has-toolbar {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  align-items: center;
}
.dt-container .dt-layout-row.has-toolbar .dt-toolbar-middle {
  justify-self: center;
}
.dt-container .dt-layout-row:last-child {
  margin-bottom: 0;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e5e7eb;
}
.dt-container .dt-layout-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 100%;
  min-width: 0;
}
.dt-container .dt-layout-row > .dt-layout-cell:last-child {
  justify-content: flex-end;
  margin-left: auto;
}
.dt-container .dt-length label,
.dt-container .dt-search label {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  max-width: 100%;
  min-width: 0;
  margin-bottom: 0;
  font-weight: 600;
  font-size: 0.92rem;
}
.dt-container .dt-filter {
  display: inline-flex;
  align-items: center;
}
.dt-container .dt-input,
.dt-container .dt-filter select,
.dt-container .dt-length select,
.dt-container .dt-search input {
  margin-top: 0;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  box-sizing: border-box;
}
.dt-container .dt-search input {
  width: min(320px, 100%);
  min-width: 180px;
  padding: 8px 10px;
}
.dt-container .dt-filter select,
.dt-container .dt-length select {
  width: auto;
  min-width: 88px;
  padding: 8px 32px 8px 10px;
}
.dt-container .dt-info {
  color: #6b7280;
  font-size: 0.9rem;
  font-weight: 600;
}
.dt-container .dt-paging {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.dt-container .dt-paging .dt-paging-button {
  padding: 0.48rem 0.78rem !important;
  border: 1px solid #d1d5db !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #111827 !important;
  font-weight: 700;
  box-shadow: none !important;
}
.dt-container .dt-paging .dt-paging-button:hover:not(.disabled):not(.current) {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border-color: #93c5fd !important;
}
.dt-container .dt-paging .dt-paging-button.current,
.dt-container .dt-paging .dt-paging-button.current:hover {
  background: #2563eb !important;
  color: #fff !important;
  border-color: #2563eb !important;
}
.dt-container .dt-paging .dt-paging-button.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.table-actions,
.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 18px;
}
.search-input {
  width: min(100%, 320px);
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 14px;
}
.table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}
.dt-container .table-responsive {
  border: 1px solid #d9dee7;
  border-radius: 10px;
  background: #fff;
}
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 720px;
  background: #fff;
}
.data-table th,
.data-table td {
  padding: 10px 12px;
  border-right: 1px solid #dfe4ea;
  border-bottom: 1px solid #dfe4ea;
  text-align: left;
  vertical-align: middle;
  font-size: 0.9rem;
  line-height: 1.35;
}
.data-table th {
  position: relative;
  background: linear-gradient(180deg, #fbfcfd 0%, #f3f5f8 100%);
  font-weight: 700;
  color: #111827;
  user-select: none;
  white-space: nowrap;
}
.data-table th:last-child,
.data-table td:last-child {
  border-right: none;
}
.data-table tbody tr:nth-child(even) td {
  background: #fbfbfc;
}
.data-table tbody tr:last-child td {
  border-bottom: none;
}
.data-table th.dt-sortable {
  cursor: pointer;
  padding-right: 28px;
}
.data-table th.dt-sortable::after {
  content: "\2195";
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: #c0c6d0;
  font-size: 0.82rem;
}
.data-table th.sort-asc::after {
  content: "\2191";
  color: #64748b;
}
.data-table th.sort-desc::after {
  content: "\2193";
  color: #64748b;
}
.data-table .actions-column,
.data-table .action-cell {
  width: 1%;
  white-space: nowrap;
}
.data-table .action-cell {
  position: relative;
  vertical-align: top;
  overflow: visible;
}
.table-action-dropdown {
  position: relative;
  display: inline-block;
}
.table-action-dropdown[open] {
  z-index: 30;
}
.table-action-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  min-width: 92px;
  padding: 0.52rem 0.78rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}
.table-action-trigger:hover {
  border-color: #93c5fd;
  background: #f8fbff;
}
.table-action-trigger::-webkit-details-marker {
  display: none;
}
.table-action-trigger::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #64748b;
  transition: transform 0.2s ease;
}
.table-action-dropdown[open] .table-action-trigger {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(147, 197, 253, 0.2);
}
.table-action-dropdown[open] .table-action-trigger::after {
  transform: rotate(180deg);
}
.table-action-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 9px);
  width: min(240px, calc(100vw - 48px));
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 24px);
  padding: 0.62rem;
  border: 1px solid #dbe2ea;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 20px 36px rgba(15, 23, 42, 0.14);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
  z-index: 950;
}
.table-action-dropdown.open-up .table-action-menu {
  top: auto;
  bottom: calc(100% + 9px);
}
.table-action-menu.is-floating {
  position: fixed;
  left: 0;
  top: 0;
  right: auto;
  bottom: auto;
}
.action-menu-form,
.action-menu-group {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.action-menu-divider {
  height: 1px;
  background: #e5e7eb;
}
.action-menu-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
}
.table-action-menu .action-button {
  width: 100%;
  min-width: 0;
  justify-content: flex-start;
  border-radius: 12px;
  padding: 0.58rem 0.78rem;
  font-size: 0.88rem;
}
.table-action-menu form {
  margin: 0;
}
.table-action-menu .compact-select,
.table-action-menu .compact-input {
  width: 100%;
  min-width: 0;
}
.table-action-menu .table-note {
  width: 100%;
  justify-content: flex-start;
  border-radius: 12px;
  white-space: normal;
}
.confirmed-orders-table .crm-action-column,
.confirmed-orders-table .crm-action-cell {
  width: 74px;
  min-width: 74px;
  text-align: center;
}
.confirmed-orders-table .crm-action-column {
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}
.crm-action-dropdown {
  display: inline-block;
}
.crm-action-trigger {
  width: 42px;
  min-width: 42px;
  height: 30px;
  padding: 0;
  justify-content: center;
  gap: 0;
  border-color: #d5dbe6;
  border-radius: 6px;
  background: #e9edf3;
  color: #111827;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}
.crm-action-trigger::after {
  display: none;
}
.crm-action-trigger:hover,
.crm-action-dropdown[open] .crm-action-trigger {
  border-color: #c6cedb;
  background: #dde3ec;
  box-shadow: none;
}
.table-action-menu.crm-action-menu {
  width: 176px;
  max-height: none;
  padding: 8px;
  gap: 0.42rem;
  border-color: #cfd6e3;
  border-radius: 6px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
  overflow: visible;
}
.crm-action-menu .action-button {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 34px;
  min-width: 0;
  border-radius: 8px;
  padding: 0.48rem 0.64rem;
  font-size: 0.84rem;
  line-height: 1.1;
  white-space: nowrap;
}
.row-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}
.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}
.action-button:hover {
  transform: translateY(-1px);
}
.action-button-edit {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.action-button-edit:hover {
  background: #dbeafe;
  color: #1e40af;
  border-color: #93c5fd;
}
.action-button-confirm {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.action-button-confirm:hover {
  background: #d1fae5;
  color: #065f46;
  border-color: #6ee7b7;
}
.action-button-sourcing {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}
.action-button-sourcing:hover {
  background: #ffedd5;
  color: #9a3412;
  border-color: #fdba74;
}
.action-button-delivered {
  background: #ecfeff;
  color: #0e7490;
  border: 1px solid #a5f3fc;
}
.action-button-delivered:hover {
  background: #cffafe;
  color: #155e75;
  border-color: #67e8f9;
}
.action-button-info {
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}
.action-button-info:hover {
  background: #ede9fe;
  color: #5b21b6;
  border-color: #c4b5fd;
}
.action-button-view {
  min-width: 0;
  padding: 0.46rem 0.72rem;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1;
  white-space: nowrap;
}
.action-button-view-message {
  background: #eef6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.action-button-view-message:hover {
  background: #dbeafe;
  color: #1e40af;
  border-color: #93c5fd;
}
.action-button-view-response {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.action-button-view-response:hover {
  background: #d1fae5;
  color: #065f46;
  border-color: #6ee7b7;
}
.action-button-view-cr {
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}
.action-button-view-cr:hover {
  background: #ede9fe;
  color: #5b21b6;
  border-color: #c4b5fd;
}
.action-button-respond {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.action-button-respond:hover {
  background: #d1fae5;
  color: #065f46;
  border-color: #6ee7b7;
}
.action-button-send-cr {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}
.action-button-send-cr:hover {
  background: #ffedd5;
  color: #9a3412;
  border-color: #fdba74;
}
.action-button-close {
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}
.action-button-close:hover {
  background: #ede9fe;
  color: #5b21b6;
  border-color: #c4b5fd;
}
.action-button-on-hold {
  background: #fefce8;
  color: #a16207;
  border: 1px solid #fde68a;
}
.action-button-on-hold:hover {
  background: #fef3c7;
  color: #854d0e;
  border-color: #facc15;
}
.action-button-delete {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
}
.action-button-delete:hover {
  background: #ffe4e6;
  color: #9f1239;
  border-color: #fda4af;
}
.table-action-stack {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 190px;
}
.compact-select,
.compact-input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #fff;
  font-size: 0.92rem;
}
.compact-input::placeholder {
  color: #9ca3af;
}
.data-table tbody tr:hover {
  background: transparent;
}
.data-table tbody tr:hover td {
  background: #f4f7fb;
}
.result-count {
  color: #6b7280;
}
.table-note {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 0.85rem;
  font-weight: 700;
}
.muted {
  color: #6b7280;
  font-size: 0.9rem;
}
.empty-state {
  padding: 24px;
  text-align: center;
  color: #6b7280;
}
.alert {
  padding: 14px 16px;
  margin-bottom: 18px;
  border-radius: 14px;
}
.alert-error {
  background: #fee2e2;
  color: #991b1b;
}
.alert-success {
  background: #ddf4ff;
  color: #075985;
}
.toast-stack {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: min(420px, calc(100vw - 2rem));
  z-index: 1500;
  pointer-events: none;
}
.toast-notification {
  margin-bottom: 0;
  border: 1px solid #bae6fd;
  box-shadow: 0 18px 34px rgba(2, 132, 199, 0.16);
  opacity: 0;
  transform: translateY(-12px);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}
.toast-notification.show {
  opacity: 1;
  transform: translateY(0);
}
.toast-notification.alert-error {
  border-color: #fecaca;
  box-shadow: 0 18px 34px rgba(185, 28, 28, 0.16);
}
.toast-notification.hide {
  opacity: 0;
  transform: translateY(-12px);
}
.form-grid {
  display: grid;
  gap: 18px;
}
.form-grid-full {
  grid-column: 1 / -1;
}
.checkbox-field {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #374151;
  font-weight: 700;
}
.checkbox-field input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #2563eb;
}
.section-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0 0 18px;
  border-bottom: 1px solid #e5e7eb;
}
.section-tabs a {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: #475569;
  font-weight: 800;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.section-tabs a.active {
  color: #1d4ed8;
  border-bottom-color: #2563eb;
}
.subsection {
  display: grid;
  gap: 18px;
  min-width: 0;
}
.subsection h3 {
  margin: 0;
  color: #111827;
}
.quote-form-section,
.quote-table-section {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding-top: 2px;
}
.quote-form-section {
  width: min(1040px, 100%);
  margin: 8px auto 0;
  padding: 24px;
  box-sizing: border-box;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}
.quote-form-section h3 {
  padding-bottom: 14px;
  border-bottom: 1px solid #e5e7eb;
}
.quote-form-section .form-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
  gap: 20px 22px;
}
.quote-form-section .form-field {
  display: flex;
  flex-direction: column;
  grid-column: span 4;
  min-width: 0;
  margin-bottom: 0;
  color: #1f2937;
  font-size: 0.94rem;
}
.quote-form-section .form-field-file {
  grid-column: span 6;
  min-width: 0;
}
.quote-form-section label input,
.quote-form-section label select {
  width: 100%;
  box-sizing: border-box;
  height: 48px;
  border-radius: 10px;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}
.quote-form-section label input:focus,
.quote-form-section label select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}
.quote-form-section input[type="file"] {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  height: 82px;
  padding: 13px 14px;
  border-style: dashed;
  background: #f8fafc;
  overflow: hidden;
}
.quote-form-section .field-hint {
  display: block;
  margin-top: 10px;
  line-height: 1.4;
}
.quote-form-section .checkbox-field {
  grid-column: span 6;
  align-self: center;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f8fafc;
}
.quote-form-section .form-actions {
  margin-top: 4px;
  padding-top: 18px;
  border-top: 1px solid #e5e7eb;
}
.company-cost-breakdown {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}
.company-cost-breakdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.company-cost-breakdown-header h4 {
  margin: 0;
  color: #111827;
  font-size: 0.98rem;
}
.add-cost-breakdown-row {
  min-height: 36px;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  font-size: 0.86rem;
}
.company-cost-breakdown-rows {
  display: grid;
  gap: 10px;
}
.company-cost-breakdown-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(140px, 220px) 36px;
  gap: 10px;
  align-items: end;
}
.company-cost-breakdown-row label {
  display: grid;
  gap: 6px;
  margin: 0;
  color: #374151;
  font-size: 0.86rem;
  font-weight: 700;
}
.company-cost-breakdown-row input {
  width: 100%;
  box-sizing: border-box;
}
.remove-cost-breakdown-row {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  background: #fff1f2;
  color: #be123c;
  font-size: 1.25rem;
  line-height: 1;
}
.remove-cost-breakdown-row:hover {
  background: #ffe4e6;
  color: #9f1239;
}
.quote-table-section {
  margin-top: 10px;
  padding-top: 22px;
  border-top: 1px solid #e5e7eb;
}
.quote-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.orders-page-shell {
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
.orders-page-panel {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: calc(100vh - 72px);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.orders-detail-shell {
  box-sizing: border-box;
  padding: 32px;
  overflow-x: hidden;
}
.orders-detail-panel {
  min-height: calc(100vh - 136px);
  padding: 12px 36px 44px;
}
.record-detail-panel {
  margin-bottom: 22px;
  border: 1px solid #d8e0eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  overflow: visible;
}
.record-detail-panel > h3 {
  margin: 0;
  padding: 20px 22px 4px;
  color: #111827;
  font-size: 1.18rem;
  line-height: 1.3;
}
.record-detail-panel > dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px 22px;
  margin: 0;
  padding: 14px 22px 22px;
}
.record-detail-panel dt {
  color: #6b7280;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}
.record-detail-panel dd {
  margin: 4px 0 0;
  color: #0f172a;
  font-size: 0.96rem;
  font-weight: 650;
  line-height: 1.35;
}
.record-detail-panel > .form-actions {
  padding: 0 22px 22px;
}
.checkout-detail-page {
  width: 100%;
  max-width: 720px;
  margin: 0;
  padding: 0 0 28px;
  color: #0f172a;
}
.checkout-detail-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 16px;
  margin-bottom: 6px;
}
.checkout-close-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 34px;
  padding: 0.45rem 0.8rem;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}
.checkout-close-link span {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e40af;
  font-size: 1rem;
  line-height: 1;
}
.checkout-close-link:hover {
  border-color: #93c5fd;
  background: #dbeafe;
  color: #1e40af;
}
.checkout-detail-section {
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid #d8dee8;
}
.checkout-detail-section:last-child {
  margin-bottom: 0;
}
.checkout-section-heading {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 24px;
}
.checkout-section-heading h4 {
  margin: 0;
  color: #020617;
  font-size: 1.24rem;
  font-weight: 800;
  line-height: 1.2;
}
.checkout-section-heading a {
  color: #2563eb;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}
.checkout-section-heading a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}
.checkout-detail-list {
  display: grid;
  gap: 19px;
  width: 100%;
  max-width: 690px;
  margin: 0;
}
.checkout-detail-row {
  display: grid;
  grid-template-columns: 18px 158px 18px minmax(0, 1fr);
  column-gap: 8px;
  align-items: start;
  min-width: 0;
}
.checkout-detail-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: #111827;
}
.checkout-detail-icon svg {
  display: block;
  width: 18px;
  height: 18px;
}
.checkout-detail-row dt,
.checkout-detail-separator {
  color: #020617;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.45;
}
.checkout-detail-separator,
.checkout-detail-value {
  margin: 0;
}
.checkout-detail-value {
  min-width: 0;
  color: #25304d;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.checkout-detail-value .file-attachment-dropdown {
  display: inline-block;
}
.checkout-detail-value .file-attachment-trigger {
  min-width: 112px;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  background: #fff;
}
.checkout-detail-value .muted {
  color: #64748b;
}
.cost-breakdown-list {
  display: grid;
  gap: 8px;
  width: min(100%, 340px);
}
.cost-breakdown-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}
.cost-breakdown-list span {
  color: #25304d;
}
.cost-breakdown-list strong {
  color: #0f172a;
  font-weight: 800;
  white-space: nowrap;
}
.cost-breakdown-total {
  padding-top: 8px;
  border-top: 1px solid #d8dee8;
}
.file-action-links {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
  width: min(100%, 260px);
  min-width: 0;
}
.file-action-controls {
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
}
.file-action-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  padding: 0.34rem 0.52rem;
  border: 1px solid #bfdbfe;
  border-radius: 7px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
  font-size: 0.76rem;
  text-decoration: none;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease;
}
.file-action-links a:hover {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}
.file-action-name,
.file-action-links > span:not(.file-action-controls):not(.file-action-name) {
  min-width: 0;
  color: #64748b;
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-action-links > span:not(.file-action-controls):not(.file-action-name) {
  grid-column: 1 / -1;
}
.file-action-list {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
}
.file-attachment-dropdown {
  min-width: 0;
}
.file-attachment-trigger {
  min-width: 88px;
  padding: 0.5rem 0.75rem;
}
.file-attachment-menu {
  width: min(340px, calc(100vw - 48px));
  gap: 0.55rem;
}
.file-attachment-menu .file-action-links {
  width: 100%;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid #eef2f7;
}
.file-attachment-menu .file-action-links:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.inline-upload-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  min-width: 260px;
}
.inline-upload-form input[type="file"] {
  width: min(100%, 280px);
  padding: 0.45rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.84rem;
  font-weight: 700;
}
.inline-upload-form input[type="text"] {
  width: min(100%, 180px);
  min-height: 2.55rem;
  padding: 0.58rem 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font-size: 0.84rem;
  font-weight: 700;
}
.inline-upload-form input[type="text"]::placeholder {
  color: #64748b;
}
.inline-upload-form input[type="file"]::file-selector-button {
  margin-right: 0.75rem;
  padding: 0.58rem 0.9rem;
  border: 0;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition:
    background 0.16s ease,
    color 0.16s ease;
}
.inline-upload-form input[type="file"]::file-selector-button:hover {
  background: #0ea5e9;
  color: #fff;
}
.inline-upload-form .button {
  min-height: 2.55rem;
  padding: 0.64rem 1rem;
  border-radius: 999px;
  font-size: 0.86rem;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}
.inline-edit-panel {
  min-width: 260px;
}
.inline-edit-panel summary {
  width: max-content;
  cursor: pointer;
  list-style: none;
}
.inline-edit-panel summary::-webkit-details-marker {
  display: none;
}
.inline-edit-panel[open] summary {
  margin-bottom: 0.65rem;
}
.inline-upload-form-edit {
  padding: 0.7rem;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: #f8fafc;
}
.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
  align-items: end;
}
.filter-grid .form-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.status-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}
.status-chip-filter {
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}
.status-chip-filter:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}
.status-chip-filter.is-active {
  border-color: rgba(15, 23, 42, 0.18);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}
.status-chip-new {
  background: #eff6ff;
  color: #1d4ed8;
}
.status-chip-waiting {
  background: #fef3c7;
  color: #92400e;
}
.status-chip-received {
  background: #dcfce7;
  color: #166534;
}
.status-chip-uploaded {
  background: #dbeafe;
  color: #1d4ed8;
}
.status-chip-extended {
  background: #fef3c7;
  color: #9a3412;
}
.status-chip-na {
  background: #e5e7eb;
  color: #374151;
}
.status-chip-disregard {
  background: #fee2e2;
  color: #b91c1c;
}
.status-chip-submitted {
  background: #ede9fe;
  color: #6d28d9;
}
@media (max-width: 760px) {
  .admin-layout {
    display: block;
  }
  .admin-sidebar {
    position: static;
    width: auto;
    min-height: 0;
    padding: 18px;
    border-right: 0;
    border-bottom: 1px solid #d9e2ef;
  }
  .admin-topbar {
    gap: 0.85rem;
    align-items: flex-start;
  }
  .admin-topbar-left,
  .admin-topbar-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  .admin-topbar-brand {
    min-width: 0;
    width: 100%;
  }
  .admin-command-search {
    width: 100%;
  }
  .admin-sidebar-nav {
    gap: 0.35rem;
  }
  .admin-main {
    padding: 16px;
  }
  .admin-sidebar ~ main.page.shell {
    margin-left: 0;
    padding: 16px;
  }
  .orders-detail-shell {
    padding: 18px;
  }
  .orders-detail-panel {
    padding: 12px 18px 34px;
  }
  .checkout-detail-page {
    width: 100%;
    padding: 0 0 24px;
  }
  .checkout-detail-topbar {
    justify-content: flex-end;
    margin-bottom: 8px;
  }
  .checkout-section-heading {
    margin-bottom: 22px;
  }
  .checkout-section-heading h4 {
    font-size: 1.25rem;
  }
  .checkout-detail-row {
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 4px 10px;
  }
  .checkout-detail-row dt,
  .checkout-detail-value {
    grid-column: 2;
  }
  .checkout-detail-separator {
    display: none;
  }
}
footer.app-footer {
  padding: 16px 24px;
  text-align: center;
  color: #6b7280;
  font-size: 0.95rem;
}
@media (max-width: 720px) {
  .statistics-summary-grid {
    grid-template-columns: 1fr;
  }
  .statistics-filter,
  .statistics-filter label {
    width: 100%;
  }
  .statistics-filter input[type="date"],
  .statistics-filter input[type="month"],
  .statistics-filter select {
    flex: 1;
    min-width: 0;
  }
  .login-shell {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .login-branding {
    padding: 0 0 8px;
  }
  .login-branding h1 {
    font-size: clamp(2rem, 11vw, 3rem);
  }
  .panel-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
  }
  .app-header nav {
    width: 100%;
  }
  .panel-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .profile-grid {
    grid-template-columns: 1fr;
  }
  .filter-grid {
    grid-template-columns: 1fr;
  }
  .company-picker-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .company-picker-clear {
    width: 100%;
  }
  .company-picker-list {
    max-height: 240px;
  }
  .table-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .quote-form-section {
    margin-top: 0;
    padding: 18px;
    border-radius: 12px;
  }
  .quote-form-section .form-grid {
    grid-template-columns: 1fr;
  }
  .quote-form-section .form-field,
  .quote-form-section .form-field-file,
  .quote-form-section .checkbox-field {
    grid-column: 1 / -1;
  }
  .company-cost-breakdown-row {
    grid-template-columns: 1fr;
  }
  .remove-cost-breakdown-row {
    width: 100%;
  }
  .quote-form-section .form-actions {
    justify-content: stretch;
  }
  .quote-form-section .form-actions .button,
  .quote-form-section .form-actions button {
    width: 100%;
  }
  .table-action-dropdown,
  .table-action-trigger {
    width: 100%;
  }
  .table-action-menu {
    left: auto;
    right: 0;
    width: min(260px, calc(100vw - 48px));
  }
  .table-action-menu.is-floating {
    left: 0;
    right: auto;
  }
  .toast-stack {
    top: 0.85rem;
    right: 0.85rem;
    left: 0.85rem;
    width: auto;
  }
  .dt-container .dt-layout-row,
  .dt-container .dt-layout-cell {
    flex-direction: column;
    align-items: flex-start;
  }
  .dt-container .dt-layout-row.has-toolbar {
    display: flex;
  }
  .dt-container .dt-search input {
    min-width: 0;
    width: 100%;
  }
}

/* Modal styles */
.modal {
  display: none !important;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

.modal.show {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  animation: modalFadeIn 0.2s ease-out;
}
#submitTenderModal {
  padding: 16px;
  box-sizing: border-box;
  overflow-y: auto;
}
#submitTenderModal .modal-content {
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  box-sizing: border-box;
}
#clarificationCrModal .modal-content {
  width: min(96vw, 1120px);
  max-width: 1120px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

#clarificationCrModal .modal-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-header {
  margin-bottom: 16px;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #111827;
}

.modal-body {
  margin-bottom: 24px;
  color: #6b7280;
}
.modal-message-meta {
  margin-top: 0;
  font-weight: 700;
  color: #374151;
}
.modal-message-box {
  max-height: 45vh;
  overflow-y: auto;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
  color: #111827;
  line-height: 1.6;
  white-space: pre-wrap;
}
.record-preview {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
  padding: 1rem;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #f8fafc;
}
.record-preview p {
  margin: 0;
}
.modal-attachment-link {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.45rem;
}
.modal-response-box {
  margin-top: 1rem;
  display: grid;
  gap: 0.55rem;
}
.modal-attachment-label {
  color: #374151;
  font-size: 0.9rem;
  font-weight: 800;
}
.modal-attachment-link .action-button {
  min-width: 0;
}
.modal-cr-image-wrap {
  max-height: calc(92vh - 180px);
  overflow: auto;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
}
.modal-cr-image {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: calc(92vh - 205px);
  margin: 0 auto;
  object-fit: contain;
}
.paste-upload-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 1rem;
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  text-align: center;
  outline: none;
}
.paste-upload-zone:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.paste-upload-zone.has-pasted-image {
  border-color: #16a34a;
  background: #f0fdf4;
  color: #166534;
}
.paste-upload-preview {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
}

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

.modal-form label {
  display: grid;
  gap: 0.55rem;
  font-weight: 700;
  color: #111827;
}

.modal-form input[type="file"] {
  width: 100%;
  padding: 0.7rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.modal-actions .button {
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
}
