/* [project]/apps/web/src/app/globals.css [app-client] (css) */
:root {
  --lightningcss-light: initial;
  --lightningcss-dark: ;
  color-scheme: light;
  --brand-50: #f3f7ff;
  --brand-100: #e6efff;
  --brand-200: #c8dcff;
  --brand-300: #9bbfff;
  --brand-400: #6d9eff;
  --brand-500: #497df2;
  --brand-600: #365fd1;
  --brand-700: #2f4dab;
  --accent-50: #fff3f7;
  --accent-100: #ffe5ee;
  --accent-400: #f76fa1;
  --accent-500: #e94b83;
  --success: #1f9d70;
  --success-soft: #e8f7f1;
  --warning: #f97316;
  --warning-soft: #fff0e8;
  --danger: #d84b4b;
  --danger-soft: #fff0f0;
  --info: #3975d6;
  --info-soft: #eef5ff;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px #1420320f, 0 1px 4px #1420320a;
  --shadow-md: 0 8px 24px #14203214;
  --shadow-lg: 0 18px 48px #1420321f;
  --focus-ring: 0 0 0 4px #497df22e;
}

html[data-theme="light"] {
  --lightningcss-light: initial;
  --lightningcss-dark: ;
  color-scheme: light;
  --bg: #fbfcff;
  --surface: #fff;
  --surface-raised: #fff;
  --surface-soft: #f8faff;
  --border: #e3e8f2;
  --border-strong: #ccd5e6;
  --text: #1c2433;
  --text-muted: #647086;
  --text-soft: #8993a6;
  --heading: #121826;
  --current-month-bg: #fffffff5;
}

html[data-theme="gray"] {
  --lightningcss-light: initial;
  --lightningcss-dark: ;
  color-scheme: light;
  --brand-50: #f3f7ff;
  --brand-100: #e6efff;
  --brand-200: #c8dcff;
  --brand-300: #9bbfff;
  --brand-400: #6d9eff;
  --brand-500: #497df2;
  --brand-600: #365fd1;
  --brand-700: #2f4dab;
  --bg: #b1b0d1;
  --surface: #dad9f4;
  --surface-raised: #fff;
  --surface-soft: #eef;
  --border: #d7dde6;
  --border-strong: #b5bfcd;
  --text: #111827;
  --text-muted: #374151;
  --text-soft: #5b6980;
  --heading: #0b1020;
  --current-month-bg: #ffffffeb;
  --success-soft: #e8f7f1;
  --warning-soft: #fff0e8;
  --danger-soft: #fff0f0;
  --info-soft: #eef5ff;
  --focus-ring: 0 0 0 4px #497df22e;
  --shadow-sm: 0 1px 2px #1118270f, 0 1px 4px #1118270a;
  --shadow-md: 0 8px 24px #1118271a;
  --shadow-lg: 0 18px 48px #11182724;
}

html[data-theme="dark"] {
  --lightningcss-light: ;
  --lightningcss-dark: initial;
  color-scheme: dark;
  --bg: #11151c;
  --surface: #1a202b;
  --surface-raised: #202836;
  --surface-soft: #161c25;
  --border: #2d3646;
  --border-strong: #404b5e;
  --text: #eef2f8;
  --text-muted: #b1bac8;
  --text-soft: #858f9f;
  --heading: #fff;
  --current-month-bg: #ffffff1a;
  --success-soft: #1f9d7026;
  --warning-soft: #f973162b;
  --danger-soft: #d84b4b29;
  --info-soft: #3975d62b;
  --shadow-sm: 0 1px 2px #0000002e;
  --shadow-md: 0 8px 24px #00000047;
  --shadow-lg: 0 18px 48px #0000005c;
}

* {
  box-sizing: border-box;
}

body {
  background: radial-gradient(circle at top left, color-mix(in srgb, var(--brand-100) 52%, transparent), transparent 34rem),
          radial-gradient(circle at 88% 10%, color-mix(in srgb, var(--accent-100) 36%, transparent), transparent 28rem),
          var(--bg);
  min-height: 100vh;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif;
  line-height: 1.5;
}

html[data-theme="gray"] body {
  background: var(--bg);
}

button, input, select {
  font: inherit;
}

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

.app-shell {
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 100vh;
  display: grid;
}

.sidebar-toggle {
  z-index: 90;
  width: 44px;
  height: 44px;
  color: var(--heading);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  cursor: pointer;
  background: #ffffffe6;
  border: 1px solid #e2e8f0eb;
  border-radius: 16px;
  justify-content: center;
  align-items: center;
  padding: 0;
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  box-shadow: 0 16px 34px #0f172a24;
}

.sidebar-toggle:focus-visible {
  outline-offset: 2px;
  outline: 3px solid #6366f13d;
}

.sidebar-toggle-lines, .sidebar-toggle-lines:before, .sidebar-toggle-lines:after {
  background: currentColor;
  border-radius: 999px;
  width: 18px;
  height: 2px;
  display: block;
}

.sidebar-toggle-lines {
  position: relative;
}

.sidebar-toggle-lines:before, .sidebar-toggle-lines:after {
  content: "";
  position: absolute;
  left: 0;
}

.sidebar-toggle-lines:before {
  top: -6px;
}

.sidebar-toggle-lines:after {
  top: 6px;
}

.sidebar-backdrop {
  z-index: 70;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  cursor: pointer;
  background: #0f172a70;
  border: 0;
  padding: 0;
  display: none;
  position: fixed;
  inset: 0;
}

.sidebar {
  z-index: 80;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  background: radial-gradient(circle at 0 0, #ec48991a, #0000 34%), linear-gradient(#fff 0%, #f8f9fd 100%);
  border-right: 1px solid #e2e8f0e6;
  flex-direction: column;
  width: 320px;
  height: 100vh;
  min-height: 100vh;
  padding: 20px 22px;
  display: flex;
  position: sticky;
  top: 0;
  overflow-y: hidden;
  box-shadow: 18px 0 50px #0f172a0f;
}

html[data-theme="gray"] .sidebar {
  background: radial-gradient(circle at 0 0, #ec48991f, #0000 34%), linear-gradient(#ffffffe0 0%, #eeeefff0 100%);
}

html[data-theme="dark"] .sidebar {
  background: radial-gradient(circle at 0 0, #ec489921, #0000 34%), linear-gradient(#1f2734 0%, #151b24 100%);
  border-right-color: #404b5ec7;
  box-shadow: 18px 0 50px #00000038;
}

.logo-card {
  background: #ffffffb8;
  border: 1px solid #e2e8f0b8;
  border-radius: 20px;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 10px;
  display: flex;
  box-shadow: 0 12px 32px #0f172a0f;
}

html[data-theme="dark"] .logo-card {
  background: #202836b8;
  border-color: #404b5eb8;
  box-shadow: 0 12px 32px #00000038;
}

.brand-mark {
  background: linear-gradient(135deg, var(--brand-500), var(--accent-400));
  color: #fff;
  border-radius: 16px;
  flex: none;
  place-items: center;
  width: 42px;
  height: 42px;
  font-weight: 850;
  display: grid;
  box-shadow: 0 10px 22px #497df238;
}

.brand-copy {
  min-width: 0;
}

.brand-name {
  color: var(--heading);
  letter-spacing: -.025em;
  font-size: 16px;
  font-weight: 820;
  line-height: 1.15;
}

.brand-subtitle {
  color: var(--text-soft);
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.2;
}

.sidebar-search-wrap {
  margin-bottom: 16px;
  position: relative;
}

.sidebar-search-icon {
  color: #98a2b3;
  pointer-events: none;
  place-items: center;
  width: 16px;
  height: 16px;
  display: grid;
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
}

.sidebar-search {
  color: #667085;
  background: #f7f8fc;
  border: 1px solid #e7eaf3;
  border-radius: 14px;
  outline: none;
  width: 100%;
  height: 38px;
  padding: 0 14px 0 40px;
  font-size: 14px;
  transition: border-color .14s, background .14s, box-shadow .14s;
}

.sidebar-search::placeholder {
  color: #98a2b3;
}

.sidebar-search:focus {
  border-color: var(--brand-500);
  background: #fff;
  box-shadow: 0 0 0 4px #6366f124;
}

html[data-theme="dark"] .sidebar-search {
  border-color: var(--border);
  color: var(--text);
  background: #161c25;
}

html[data-theme="dark"] .sidebar-search:focus {
  background: #202836;
}

.sidebar-nav {
  flex-direction: column;
  flex: auto;
  min-height: 0;
  display: flex;
}

.sidebar-nav-scroll {
  align-content: start;
  gap: 16px;
  display: grid;
}

.nav-section {
  gap: 8px;
  display: grid;
}

.nav-section-title {
  color: #a0a8ba;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0;
  padding: 0 14px;
  font-size: 11px;
  font-weight: 760;
  line-height: 1;
}

.nav-list {
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
}

.menu-item {
  color: #667085;
  border-radius: 16px;
  align-items: center;
  gap: 11px;
  height: 44px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  transition: transform .18s, background .18s, color .18s, box-shadow .18s;
  display: flex;
  position: relative;
}

.menu-item:hover {
  color: #344054;
  background: #6366f10f;
  transform: translateX(2px);
}

.menu-item:focus-visible {
  outline-offset: 2px;
  outline: 3px solid #6366f13d;
}

.menu-item[aria-disabled="true"] {
  opacity: .46;
  pointer-events: none;
}

.menu-icon {
  color: #667085;
  background: #f1f4fb;
  border-radius: 12px;
  flex: none;
  place-items: center;
  width: 32px;
  min-width: 32px;
  height: 32px;
  transition: background .18s, color .18s, transform .18s;
  display: grid;
}

.menu-icon svg {
  stroke-width: 2.1px;
  width: 18px;
  height: 18px;
}

.menu-label {
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
}

.menu-item:hover .menu-icon {
  color: #344054;
  transform: scale(1.04);
}

.menu-item.active {
  color: #3152b8;
  background: linear-gradient(135deg, #fff, #eef2ff);
  box-shadow: 0 12px 28px #3152b821;
}

.menu-item.active:after {
  content: "";
  background: #ec4899;
  border-radius: 999px;
  width: 8px;
  height: 8px;
  position: absolute;
  right: 12px;
  box-shadow: 0 0 0 5px #ec48991f;
}

.menu-item.active .menu-icon {
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #ec4899);
}

html[data-theme="dark"] .menu-item {
  color: #b1bac8;
}

html[data-theme="dark"] .menu-item:hover {
  color: #fff;
  background: #6366f121;
}

html[data-theme="dark"] .menu-icon {
  color: #b1bac8;
  background: #ffffff14;
}

html[data-theme="dark"] .menu-item.active {
  color: #c8dcff;
  background: linear-gradient(135deg, #ffffff1f, #6366f138);
  box-shadow: 0 12px 28px #0000003d;
}

.nav-section.is-empty {
  display: none;
}

.main {
  min-width: 0;
  padding: 32px;
}

.sidebar-style-item {
  padding: 0;
}

.sidebar-style {
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-soft) 74%, transparent);
  border-radius: 14px;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  padding: 8px 10px 8px 14px;
  display: flex;
}

.sidebar-style-title {
  color: var(--text-muted);
  letter-spacing: .02em;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
}

.sidebar-quick-block {
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  display: grid;
}

.sidebar-quick-title {
  color: #a0a8ba;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 820;
  line-height: 1;
}

.sidebar-quick-access {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  display: grid;
}

.sidebar-quick-tile {
  aspect-ratio: auto;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-soft) 82%, transparent);
  min-width: 0;
  height: 40px;
  min-height: 0;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
  border-radius: 12px;
  place-items: center;
  padding: 7px;
  transition: transform .14s, background .14s, color .14s, border-color .14s, box-shadow .14s;
  display: grid;
  position: relative;
  overflow: hidden;
}

.sidebar-quick-tile:before {
  content: "";
  background: radial-gradient(circle at 50% 28%,
          color-mix(in srgb, var(--brand-200) 46%, transparent),
          transparent 64%);
  opacity: .44;
  pointer-events: none;
  position: absolute;
  inset: 0;
}

.sidebar-quick-tile:hover {
  border-color: var(--border-strong);
  background: var(--surface-raised);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.sidebar-quick-tile:focus-visible {
  border-color: var(--brand-500);
  box-shadow: var(--focus-ring);
  outline: none;
}

.sidebar-quick-icon {
  z-index: 1;
  opacity: .92;
  place-items: center;
  width: 24px;
  height: 24px;
  transition: opacity .14s, transform .14s;
  display: grid;
  position: relative;
}

.sidebar-quick-icon svg {
  stroke-width: 2.1px;
  width: 20px;
  height: 20px;
}

.sidebar-quick-tile:hover {
  color: var(--heading);
}

.sidebar-quick-tile:hover .sidebar-quick-icon {
  opacity: 1;
  transform: scale(1.06);
}

html[data-theme="dark"] .sidebar-quick-tile:before {
  background: radial-gradient(circle at 50% 28%,
          color-mix(in srgb, var(--brand-500) 26%, transparent),
          transparent 64%);
  opacity: .5;
}

.theme-switcher {
  align-items: center;
  gap: 7px;
  display: inline-flex;
}

.theme-option {
  border: 1.5px solid var(--border-strong);
  background: var(--theme-swatch);
  cursor: pointer;
  border-radius: 50%;
  place-items: center;
  width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  transition: transform .14s, border-color .14s, box-shadow .14s;
  display: grid;
  position: relative;
  box-shadow: inset 0 0 0 1px #1420320f;
}

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

.theme-option:focus-within {
  box-shadow: var(--focus-ring);
  outline: none;
}

.theme-option-input {
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  margin: 0;
  position: absolute;
  inset: 0;
}

.theme-option[data-theme-choice="light"] {
  --theme-swatch: #fff;
}

.theme-option[data-theme-choice="gray"] {
  --theme-swatch: #b1b0d1;
}

.theme-option[data-theme-choice="dark"] {
  --theme-swatch: #11151c;
}

.theme-option[aria-pressed="true"] {
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px #497df22e, inset 0 0 0 1px #14203214;
}

.btn {
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid #0000;
  border-radius: 10px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 720;
  transition: transform .14s, background .14s, border-color .14s, box-shadow .14s;
  display: inline-flex;
}

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

.btn-primary {
  background: var(--brand-600);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-700);
}

html[data-theme="gray"] .btn-primary, html[data-theme="gray"] .chip.active, html[data-theme="gray"] .chip-control.active {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #fff;
}

html[data-theme="gray"] .chip-control:has(.chip-input:checked) {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #fff;
}

html[data-theme="gray"] .btn-primary:hover {
  background: var(--brand-700);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-sm {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.page-header {
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
  display: flex;
}

.eyebrow {
  color: var(--accent-500);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
}

.page-title {
  color: var(--heading);
  margin: 0;
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 780;
  line-height: 1.08;
}

.page-desc {
  max-width: 720px;
  color: var(--text-muted);
  margin: 12px 0 0;
  font-size: 15px;
}

.header-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  display: flex;
}

.materials-subtabs {
  z-index: 30;
  border: 1px solid color-mix(in srgb, var(--brand-700) 72%, var(--border));
  background: radial-gradient(circle at 14% 50%, color-mix(in srgb, var(--accent-500) 30%, transparent), transparent 28rem),
          linear-gradient(135deg,
            color-mix(in srgb, var(--brand-700) 88%, transparent),
            color-mix(in srgb, var(--brand-600) 86%, transparent));
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
  backdrop-filter: blur(18px) saturate(1.18);
  width: 100%;
  height: 76px;
  box-shadow: 0 14px 30px color-mix(in srgb, var(--brand-700) 20%, transparent);
  border-radius: 20px;
  margin: -2px 0 24px;
  padding: 8px;
  position: sticky;
  top: 12px;
}

.materials-subtabs-control {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 10px;
  height: 100%;
  display: grid;
}

.materials-subtab {
  color: #ffffffd1;
  cursor: pointer;
  text-align: left;
  background: #ffffff1a;
  border: 1px solid #ffffff3d;
  border-radius: 14px;
  align-items: center;
  gap: 10px;
  height: 48px;
  min-height: 0;
  padding: 7px 14px;
  transition: opacity .16s, transform .14s, background .14s, color .14s, border-color .14s, box-shadow .14s;
  display: flex;
  box-shadow: inset 0 1px #ffffff1f;
}

.materials-subtab:after {
  content: "";
  display: none;
}

.materials-subtab:not([aria-selected="true"]) {
  opacity: .8;
  height: 44px;
  min-height: 0;
  padding: 6px 14px;
  transform: scale(.985);
}

.materials-subtab:not([aria-selected="true"]) .materials-subtab-icon {
  border-radius: 10px;
  width: 30px;
  height: 30px;
  font-size: 15px;
}

.materials-subtab:hover {
  color: #fff;
  background: #ffffff29;
  border-color: #ffffff61;
  transform: translateY(-1px);
  box-shadow: inset 0 1px #ffffff2e, 0 10px 24px #14203229;
}

.materials-subtab:not([aria-selected="true"]):hover {
  transform: translateY(-1px)scale(.985);
}

.materials-subtab-icon {
  color: #fff;
  background: #ffffff29;
  border-radius: 12px;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  font-size: 16px;
  display: grid;
}

.materials-subtab-text {
  flex: auto;
  gap: 0;
  min-width: 0;
  display: grid;
}

.materials-subtab-title {
  color: #fff;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 16px;
  font-weight: 550;
  line-height: 1.15;
  overflow: hidden;
}

.materials-subtab-desc {
  display: none;
}

.materials-subtab[aria-selected="true"] {
  opacity: 1;
  height: 56px;
  min-height: 0;
  color: var(--brand-700);
  background: #fff;
  border-color: #fff;
  padding: 8px 16px;
  transform: none;
  box-shadow: 0 10px 24px #1420322e;
}

.materials-subtab[aria-selected="true"]:after {
  content: "";
  border-right: 2.2px solid var(--brand-700);
  border-bottom: 2.2px solid var(--brand-700);
  transform-origin: center;
  border-radius: 1px;
  flex: none;
  width: 9px;
  height: 9px;
  margin-left: auto;
  margin-right: 6px;
  transition: border-color .14s, transform .14s;
  animation: 1.25s ease-in-out infinite materials-subtab-arrow-nudge;
  display: block;
  transform: translateX(0)rotate(135deg);
}

@keyframes materials-subtab-arrow-nudge {
  0%, 100% {
    opacity: .72;
    transform: translateX(0)rotate(135deg);
  }

  50% {
    opacity: 1;
    transform: translateX(-7px)rotate(135deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .materials-subtab[aria-selected="true"]:after {
    opacity: 1;
    animation: none;
    transform: translateX(0)rotate(135deg);
  }
}

.materials-subtab[aria-selected="true"] .materials-subtab-icon {
  background: color-mix(in srgb, var(--brand-600) 12%, transparent);
  color: var(--brand-700);
}

.materials-subtab[aria-selected="true"] .materials-subtab-title {
  color: var(--brand-700);
}

.materials-subtab[aria-selected="true"] .materials-subtab-desc {
  color: var(--text-muted);
}

.materials-tab-panel {
  display: none;
}

.materials-tab-panel.active {
  display: block;
}

.kpi-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 24px;
  display: grid;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  min-height: 126px;
  box-shadow: var(--shadow-sm);
  grid-template-columns: 54px minmax(0, 1fr) 112px;
  align-items: center;
  gap: 14px;
  padding: 20px;
  display: grid;
  position: relative;
  overflow: hidden;
}

.kpi-icon {
  color: #fff;
  width: 48px;
  height: 48px;
  box-shadow: var(--shadow-sm);
  border-radius: 16px;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
  display: grid;
}

.kpi-icon.all {
  background: linear-gradient(135deg, #6d5dfc, #a855f7);
}

.kpi-icon.low {
  background: linear-gradient(135deg, #f0527d, #d946ef);
}

.kpi-icon.active {
  background: linear-gradient(135deg, #40c98b, #69d6a3);
}

.kpi-icon.inactive {
  background: linear-gradient(135deg, #8b95a7, #5f6b7a);
}

.kpi-icon.overdue {
  background: linear-gradient(135deg, var(--accent-500), var(--accent-400));
}

.kpi-card > :nth-child(2) {
  min-width: 0;
}

.kpi-label {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 760;
}

.kpi-value {
  color: var(--heading);
  letter-spacing: -.045em;
  margin-top: 6px;
  font-size: 34px;
  font-weight: 820;
  line-height: 1;
}

.kpi-caption {
  color: var(--text-soft);
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.35;
}

.month-map-wrap {
  place-self: center end;
  gap: 5px;
  width: max-content;
  display: grid;
}

.month-map {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  border-radius: 14px;
  grid-template-columns: repeat(7, 9px);
  grid-auto-rows: 9px;
  gap: 3px;
  width: max-content;
  padding: 10px;
  display: grid;
  box-shadow: inset 0 0 0 1px #ffffff6b;
}

.month-weekday {
  width: 9px;
  height: 9px;
  color: var(--text-soft);
  letter-spacing: -.03em;
  text-align: center;
  -webkit-user-select: none;
  user-select: none;
  place-items: center;
  font-size: 8px;
  font-weight: 400;
  line-height: 1;
  display: grid;
}

.month-map-label {
  color: var(--text-soft);
  text-align: left;
  padding-left: 2px;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.2;
}

.month-cell {
  z-index: 1;
  background: var(--surface-raised);
  border: 1px solid color-mix(in srgb, var(--border-strong) 72%, transparent);
  border-radius: 3px;
  width: 9px;
  height: 9px;
  transition: box-shadow .14s, background .14s, border-color .14s, opacity .14s;
  position: relative;
}

.month-cell:not(.prev-month):not(.next-month) {
  z-index: 2;
  box-shadow: 0 0 0 4px var(--current-month-bg);
}

.month-cell.low, .month-cell.overdue {
  background: var(--accent-500);
  border-color: var(--accent-500);
}

.month-cell.risk {
  background: var(--warning);
  border-color: var(--warning);
}

.month-cell.combined {
  background: linear-gradient(135deg, var(--accent-500) 0 50%, var(--warning) 50% 100%);
  border-color: #0000;
}

.month-cell.prev-month, .month-cell.next-month {
  background: color-mix(in srgb, var(--surface-raised) 58%, var(--surface-soft));
  border-color: color-mix(in srgb, var(--border-strong) 38%, transparent);
  opacity: .58;
}

.month-cell.prev-month.low, .month-cell.prev-month.overdue, .month-cell.next-month.low, .month-cell.next-month.overdue {
  background: color-mix(in srgb, var(--accent-500) 30%, var(--surface-raised));
  border-color: color-mix(in srgb, var(--accent-500) 36%, var(--border));
  opacity: .55;
}

.month-cell.prev-month.risk, .month-cell.next-month.risk {
  background: color-mix(in srgb, var(--warning) 34%, var(--surface-raised));
  border-color: color-mix(in srgb, var(--warning) 38%, var(--border));
  opacity: .55;
}

.month-cell.prev-month.combined, .month-cell.next-month.combined {
  background: linear-gradient(135deg,
          color-mix(in srgb, var(--accent-500) 32%, var(--surface-raised)) 0 50%,
          color-mix(in srgb, var(--warning) 34%, var(--surface-raised)) 50% 100%);
  border-color: color-mix(in srgb, var(--border-strong) 44%, transparent);
  opacity: .55;
}

html[data-theme="dark"] .month-map {
  background: #f8faff;
  border-color: #e3e8f2;
  box-shadow: inset 0 0 0 1px #ffffff6b;
}

html[data-theme="dark"] .month-weekday, html[data-theme="dark"] .month-map-label {
  color: #8993a6;
}

html[data-theme="dark"] .month-cell {
  background: #fff;
  border-color: #ccd5e6b8;
}

html[data-theme="dark"] .month-cell:not(.prev-month):not(.next-month) {
  box-shadow: 0 0 0 4px #fffffff5;
}

html[data-theme="dark"] .month-cell.prev-month, html[data-theme="dark"] .month-cell.next-month {
  opacity: .58;
  background: #fcfdff;
  border-color: #ccd5e661;
}

html[data-theme="dark"] .month-cell.prev-month.low, html[data-theme="dark"] .month-cell.prev-month.overdue, html[data-theme="dark"] .month-cell.next-month.low, html[data-theme="dark"] .month-cell.next-month.overdue {
  background: color-mix(in srgb, var(--accent-500) 30%, #fff);
  border-color: color-mix(in srgb, var(--accent-500) 36%, #e3e8f2);
  opacity: .55;
}

html[data-theme="dark"] .month-cell.prev-month.risk, html[data-theme="dark"] .month-cell.next-month.risk {
  background: color-mix(in srgb, var(--warning) 34%, #fff);
  border-color: color-mix(in srgb, var(--warning) 38%, #e3e8f2);
  opacity: .55;
}

html[data-theme="dark"] .month-cell.prev-month.combined, html[data-theme="dark"] .month-cell.next-month.combined {
  background: linear-gradient(135deg,
          color-mix(in srgb, var(--accent-500) 32%, #fff) 0 50%,
          color-mix(in srgb, var(--warning) 34%, #fff) 50% 100%);
  opacity: .55;
  border-color: #ccd5e670;
}

.month-cell.today:not(.prev-month):not(.next-month) {
  box-shadow: 0 0 0 4px var(--current-month-bg);
  animation: 1.65s ease-in-out infinite month-today-cell-pulse;
  overflow: visible;
  border-color: color-mix(in srgb, var(--success) 68%, var(--border-strong)) !important;
}

.month-map:not(.is-clear) .month-cell.today:not(.prev-month):not(.next-month) {
  z-index: 7;
}

.month-map.is-clear .month-cell.today:not(.prev-month):not(.next-month) {
  z-index: 2;
}

.month-cell.today:not(.prev-month):not(.next-month):after {
  content: "";
  border: 1.5px solid color-mix(in srgb, var(--success) 70%, transparent);
  opacity: 0;
  transform-origin: center;
  pointer-events: none;
  border-radius: 8px;
  animation: 1.65s cubic-bezier(.2, 0, 0, 1) infinite month-today-halo-pulse;
  position: absolute;
  inset: -5px;
  transform: scale(.72);
}

@keyframes month-today-cell-pulse {
  0%, 100% {
    border-color: color-mix(in srgb, var(--success) 42%, var(--border-strong));
    box-shadow: 0 0 0 4px var(--current-month-bg),
            0 0 0 0 color-mix(in srgb, var(--success) 0%, transparent);
  }

  50% {
    border-color: var(--success);
    box-shadow: 0 0 0 4px var(--current-month-bg),
            0 0 12px 2px color-mix(in srgb, var(--success) 34%, transparent);
  }
}

@keyframes month-today-halo-pulse {
  0% {
    opacity: .78;
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 22%, transparent);
    transform: scale(.72);
  }

  72% {
    opacity: .08;
    box-shadow: 0 0 12px 3px color-mix(in srgb, var(--success) 8%, transparent);
    transform: scale(1.32);
  }

  100% {
    opacity: 0;
    box-shadow: 0 0 16px 4px color-mix(in srgb, var(--success) 0%, transparent);
    transform: scale(1.42);
  }
}

@media (prefers-reduced-motion: reduce) {
  .month-cell.today:not(.prev-month):not(.next-month), .month-cell.today:not(.prev-month):not(.next-month):after {
    animation: none;
  }
}

.month-map.is-clear {
  position: relative;
  overflow: hidden;
}

.month-map.is-clear .month-weekday, .month-map.is-clear .month-cell {
  filter: blur(1.15px);
  opacity: .34;
}

.month-map.is-clear:after {
  content: "Проблем нет";
  z-index: 8;
  color: var(--success);
  letter-spacing: -.015em;
  text-align: center;
  text-shadow: 0 1px #ffffffd6;
  pointer-events: none;
  place-items: center;
  padding: 10px;
  font-size: 12px;
  font-weight: 820;
  display: grid;
  position: absolute;
  inset: 0;
}

html[data-theme="dark"] .month-map.is-clear:after {
  text-shadow: 0 1px #ffffffb8;
}

.month-map {
  cursor: pointer;
}

.month-map:hover {
  border-color: color-mix(in srgb, var(--brand-500) 36%, var(--border));
  box-shadow: inset 0 0 0 1px #ffffff6b,
          0 8px 18px color-mix(in srgb, var(--brand-600) 9%, transparent);
}

.month-map:focus-visible {
  border-color: var(--brand-500);
  box-shadow: var(--focus-ring);
  outline: none;
}

.calendar-modal {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  width: min(620px, 100vw - 32px);
  max-width: calc(100vw - 32px);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  margin: auto;
  padding: 0;
}

.calendar-modal::backdrop {
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  background: #0f172a70;
}

.calendar-modal-card {
  gap: 18px;
  padding: 22px;
  display: grid;
}

.calendar-modal-header {
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  display: flex;
}

.calendar-modal-title-row {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  display: flex;
}

.calendar-modal-title {
  color: var(--heading);
  letter-spacing: -.03em;
  font-size: 22px;
  font-weight: 820;
  line-height: 1.15;
}

.calendar-modal-subtitle {
  color: var(--text-muted);
  margin-top: 6px;
  font-size: 13px;
}

.calendar-modal-status {
  border-radius: var(--radius-pill);
  background: var(--success-soft);
  min-height: 26px;
  color: var(--success);
  align-items: center;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 820;
  display: none;
}

.calendar-modal-status.is-visible {
  display: inline-flex;
}

.calendar-modal-close {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  width: 36px;
  height: 36px;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 12px;
  flex: none;
  place-items: center;
  padding: 0;
  font-size: 22px;
  line-height: 1;
  display: grid;
}

.calendar-modal-close:hover {
  border-color: var(--border-strong);
  background: var(--surface-raised);
  color: var(--text);
}

.calendar-modal-body {
  padding: 2px;
  overflow-x: auto;
}

.month-map.month-map-expanded {
  cursor: default;
  background: var(--surface-soft);
  border-radius: 22px;
  grid-template-columns: repeat(7, 58px);
  grid-auto-rows: 58px;
  justify-content: center;
  gap: 8px;
  width: max-content;
  min-width: 100%;
  padding: 18px;
}

.month-map.month-map-expanded:hover {
  border-color: var(--border);
  box-shadow: inset 0 0 0 1px #ffffff6b;
}

.month-map-expanded .month-weekday {
  width: 58px;
  height: 30px;
  color: var(--text-muted);
  letter-spacing: .02em;
  text-transform: uppercase;
  align-self: end;
  font-size: 12px;
  font-weight: 820;
}

.month-map-expanded .month-cell {
  letter-spacing: -.03em;
  border-radius: 15px;
  grid-template-rows: auto 1fr auto;
  place-items: start center;
  width: 58px;
  height: 58px;
  padding: 7px 6px 6px;
  font-size: 14px;
  font-weight: 820;
  line-height: 1;
  display: grid;
}

.month-map-expanded .month-cell:not(.prev-month):not(.next-month) {
  box-shadow: 0 0 0 5px var(--current-month-bg);
}

.month-map-expanded .month-cell-date {
  z-index: 2;
  min-width: 20px;
  height: 20px;
  color: var(--heading);
  border-radius: 999px;
  justify-content: center;
  justify-self: center;
  align-items: center;
  display: inline-flex;
  position: relative;
}

.month-map-expanded .month-cell.low .month-cell-date, .month-map-expanded .month-cell.overdue .month-cell-date, .month-map-expanded .month-cell.risk .month-cell-date, .month-map-expanded .month-cell.combined .month-cell-date {
  color: #fff;
}

.month-map-expanded .month-cell.prev-month .month-cell-date, .month-map-expanded .month-cell.next-month .month-cell-date {
  color: var(--text-soft);
}

.month-map-expanded .month-cell.prev-month.low .month-cell-date, .month-map-expanded .month-cell.prev-month.overdue .month-cell-date, .month-map-expanded .month-cell.prev-month.risk .month-cell-date, .month-map-expanded .month-cell.prev-month.combined .month-cell-date, .month-map-expanded .month-cell.next-month.low .month-cell-date, .month-map-expanded .month-cell.next-month.overdue .month-cell-date, .month-map-expanded .month-cell.next-month.risk .month-cell-date, .month-map-expanded .month-cell.next-month.combined .month-cell-date {
  color: color-mix(in srgb, white 78%, var(--text-soft));
}

.month-map-expanded .month-cell-open {
  z-index: 3;
  border-radius: var(--radius-pill);
  width: auto;
  min-width: 40px;
  max-width: 44px;
  min-height: 16px;
  color: var(--heading);
  cursor: pointer;
  letter-spacing: -.01em;
  white-space: nowrap;
  background: #ffffffe0;
  border: 1px solid #ffffffb3;
  justify-content: center;
  place-self: end center;
  align-items: center;
  padding: 0 5px;
  font-size: 8.5px;
  font-weight: 500;
  line-height: 1;
  transition: transform .14s, background .14s, border-color .14s, box-shadow .14s;
  display: inline-flex;
  position: relative;
  box-shadow: 0 2px 6px #1420321a;
}

.month-map-expanded .month-cell-open:hover {
  background: #fff;
  border-color: #fffffff0;
  transform: translateY(-1px);
  box-shadow: 0 5px 12px #14203229;
}

.month-map-expanded .month-cell-open:focus-visible {
  border-color: var(--success);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 20%, transparent),
          0 5px 12px #14203229;
  outline: none;
}

.month-map-expanded .month-cell.prev-month .month-cell-open, .month-map-expanded .month-cell.next-month .month-cell-open {
  opacity: .78;
}

.month-map-expanded .month-cell.today:not(.prev-month):not(.next-month):after {
  border-width: 2px;
  border-radius: 20px;
  inset: -8px;
}

.month-map-expanded.is-clear .month-weekday, .month-map-expanded.is-clear .month-cell {
  filter: none;
  opacity: 1;
}

.month-map-expanded.is-clear:after {
  display: none;
}

html[data-theme="dark"] .month-map.month-map-expanded {
  background: #f8faff;
}

html[data-theme="dark"] .month-map-expanded .month-cell-date {
  color: #121826;
}

html[data-theme="dark"] .month-map-expanded .month-cell.low .month-cell-date, html[data-theme="dark"] .month-map-expanded .month-cell.overdue .month-cell-date, html[data-theme="dark"] .month-map-expanded .month-cell.risk .month-cell-date, html[data-theme="dark"] .month-map-expanded .month-cell.combined .month-cell-date {
  color: #fff;
}

@media (max-width: 720px) {
  .calendar-modal-card {
    padding: 18px;
  }

  .month-map.month-map-expanded {
    grid-template-columns: repeat(7, 44px);
    grid-auto-rows: 44px;
    gap: 7px;
    min-width: max-content;
    padding: 14px;
  }

  .month-map-expanded .month-weekday {
    width: 44px;
    height: 24px;
    font-size: 10px;
  }

  .month-map-expanded .month-cell {
    border-radius: 12px;
    width: 44px;
    height: 44px;
    padding: 5px;
    font-size: 12px;
  }

  .month-map-expanded .month-cell-open {
    min-width: 34px;
    max-width: 36px;
    min-height: 14px;
    padding: 0 4px;
    font-size: 7px;
    font-weight: 500;
  }
}

.calendar-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  padding: 18px;
}

.calendar-header {
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  display: flex;
}

.calendar-title {
  color: var(--heading);
  letter-spacing: -.02em;
  font-size: 20px;
  font-weight: 780;
}

.calendar-subtitle {
  color: var(--text-muted);
  margin-top: 4px;
  font-size: 13px;
}

.calendar-grid {
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 6px;
  display: grid;
}

.calendar-day {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 14px;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: stretch;
  min-height: 58px;
  padding: 3px;
  display: grid;
}

.calendar-day.overdue, .calendar-day.production-risk, .calendar-header .badge-danger, .calendar-header .badge-warning, .alert-card {
  cursor: pointer;
}

.calendar-day-number {
  background: var(--surface-soft);
  width: 100%;
  min-height: 38px;
  color: var(--heading);
  letter-spacing: -.03em;
  border-radius: 11px;
  place-items: center;
  font-size: 18px;
  font-weight: 820;
  display: grid;
}

.calendar-day.overdue .calendar-day-number {
  background: var(--accent-500);
  color: #fff;
}

.calendar-day.production-risk .calendar-day-number {
  background: var(--warning);
  color: #fff;
}

.calendar-day.overdue.production-risk .calendar-day-number {
  background: linear-gradient(135deg, var(--accent-500) 0 50%, var(--warning) 50% 100%);
  color: #fff;
}

.calendar-day-label {
  color: var(--text-muted);
  letter-spacing: .04em;
  text-transform: uppercase;
  text-align: center;
  margin-top: 3px;
  font-size: 9px;
  font-weight: 820;
  line-height: 1;
  display: none;
}

.calendar-day.today {
  border-color: color-mix(in srgb, var(--success) 58%, var(--border));
  background: color-mix(in srgb, var(--success) 16%, var(--surface-raised));
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--success) 34%, transparent),
          0 0 0 3px color-mix(in srgb, var(--success) 10%, transparent),
          var(--shadow-sm);
  position: relative;
}

.calendar-day.today .calendar-day-label {
  color: var(--success);
  display: block;
}

.calendar-day.today:not(.overdue):not(.production-risk) .calendar-day-number {
  background: var(--surface-soft);
  color: var(--heading);
}

.calendar-day.today.overdue:not(.production-risk) .calendar-day-number {
  background: var(--accent-500);
  color: #fff;
}

.calendar-day.today.production-risk:not(.overdue) .calendar-day-number {
  background: var(--warning);
  color: #fff;
}

.calendar-day.today.overdue.production-risk .calendar-day-number {
  background: linear-gradient(135deg, var(--accent-500) 0 50%, var(--warning) 50% 100%);
  color: #fff;
}

.calendar-events {
  display: none;
}

.calendar-event {
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}

.calendar-event.overdue {
  background: color-mix(in srgb, var(--accent-500) 14%, transparent);
  color: var(--accent-500);
}

.calendar-event.production {
  background: color-mix(in srgb, var(--warning) 16%, transparent);
  color: var(--warning);
}

.alerts-section {
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
  display: grid;
}

.alert-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 16px;
}

.alert-panel-header {
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
  display: flex;
}

.alert-panel-title {
  color: var(--heading);
  letter-spacing: -.02em;
  font-size: 18px;
  font-weight: 780;
}

.alert-panel-subtitle {
  color: var(--text-muted);
  margin-top: 4px;
  font-size: 13px;
}

.alert-card-list {
  gap: 10px;
  display: grid;
}

.alert-card {
  border: 1px solid var(--border);
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
  border-radius: 16px;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  transition: transform .14s, border-color .14s, box-shadow .14s;
  display: grid;
}

.alert-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.alert-preview {
  contain: layout paint;
  isolation: isolate;
  aspect-ratio: 1;
  border: 1px solid var(--border);
  background: radial-gradient(circle at 50% 42%, #ffffffb8, #0000 20px), linear-gradient(135deg, #e7e9ee, #cfd5df);
  border-radius: 14px;
  width: 64px;
  position: relative;
  overflow: hidden;
}

html[data-theme="dark"] .alert-preview {
  background: radial-gradient(circle at 50% 42%, #ffffff1f, transparent 20px),
          linear-gradient(135deg, var(--surface-soft), var(--border));
}

html[data-theme="gray"] .alert-preview {
  background: radial-gradient(circle at 50% 42%, #ffffffbd, #0000 20px), linear-gradient(135deg, #f1f3f6, #dfe5ee);
}

.alert-content {
  gap: 4px;
  min-width: 0;
  display: grid;
}

.alert-title {
  color: var(--heading);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 780;
  line-height: 1.25;
  overflow: hidden;
}

.alert-meta {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.3;
}

.alert-action {
  justify-items: end;
  gap: 8px;
  display: grid;
}

.alert-empty-note {
  border: 1px dashed var(--border-strong);
  background: var(--surface-soft);
  color: var(--text-muted);
  text-align: center;
  border-radius: 16px;
  padding: 18px;
  font-size: 13px;
}

.alert-empty-note.alert-empty-success {
  border: 1px solid color-mix(in srgb, var(--success) 34%, var(--border));
  background: var(--success-soft);
  min-height: 112px;
  color: var(--success);
  letter-spacing: -.02em;
  place-items: center;
  padding: 24px;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.22;
  display: grid;
}

.alert-card-list[hidden], .alert-empty-note[hidden] {
  display: none;
}

.toolbar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px;
  display: grid;
}

.toolbar-top {
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  display: flex;
}

.toolbar-title {
  color: var(--heading);
  letter-spacing: -.02em;
  font-size: 18px;
  font-weight: 760;
}

.toolbar-controls {
  grid-template-columns: minmax(260px, 1fr) 180px 180px 170px;
  gap: 12px;
  display: grid;
}

.toolbar-search-spoiler {
  border-top: 1px solid var(--border);
  gap: 12px;
  margin-top: 2px;
  padding-top: 12px;
  display: grid;
}

.toolbar-search-spoiler > summary {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  min-height: 42px;
  color: var(--text-muted);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  border-radius: 12px;
  grid-template-columns: auto minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 12px;
  list-style: none;
  transition: background .14s, border-color .14s, color .14s, box-shadow .14s;
  display: grid;
}

.toolbar-search-spoiler > summary::-webkit-details-marker {
  display: none;
}

.toolbar-search-spoiler > summary:hover {
  border-color: var(--border-strong);
  background: var(--surface-raised);
  color: var(--text);
}

.toolbar-search-spoiler > summary:focus-visible {
  border-color: var(--brand-500);
  box-shadow: var(--focus-ring);
  outline: none;
}

.toolbar-search-spoiler-title {
  color: var(--heading);
  font-size: 13px;
  font-weight: 720;
  line-height: 1;
}

.toolbar-search-spoiler-hint {
  color: var(--text-soft);
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
}

.toolbar-search-spoiler-chevron {
  border: 1px solid var(--border);
  background: var(--surface-raised);
  border-radius: 9px;
  place-items: center;
  width: 28px;
  height: 28px;
  transition: background .14s, border-color .14s, transform .14s;
  display: grid;
  position: relative;
}

.toolbar-search-spoiler-chevron:before {
  content: "";
  border-right: 2px solid var(--text-soft);
  border-bottom: 2px solid var(--text-soft);
  width: 8px;
  height: 8px;
  transition: border-color .14s, transform .14s;
  transform: translateY(-2px)rotate(45deg);
}

.toolbar-search-spoiler > summary:hover .toolbar-search-spoiler-chevron {
  border-color: var(--border-strong);
  background: var(--surface);
}

.toolbar-search-spoiler[open] > summary {
  border-color: var(--border-strong);
  background: var(--surface-raised);
  color: var(--text);
}

.toolbar-search-spoiler[open] .toolbar-search-spoiler-chevron {
  border-color: color-mix(in srgb, var(--brand-600) 34%, var(--border));
  background: color-mix(in srgb, var(--brand-600) 10%, var(--surface-raised));
}

.toolbar-search-spoiler[open] .toolbar-search-spoiler-chevron:before {
  border-color: var(--brand-600);
  transform: translateY(2px)rotate(225deg);
}

.toolbar-search-spoiler-body {
  gap: 12px;
  padding-top: 2px;
  display: grid;
}

.search-field {
  min-width: 0;
  position: relative;
}

.search-icon {
  color: var(--text-soft);
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
}

.input, .select {
  border: 1px solid var(--border-strong);
  background: var(--surface-raised);
  width: 100%;
  height: 42px;
  color: var(--text);
  border-radius: 12px;
  outline: none;
  padding: 0 13px;
  font-size: 14px;
  transition: border-color .14s, box-shadow .14s, background .14s;
}

.search-field .input {
  padding-left: 40px;
}

.input:focus, .select:focus {
  border-color: var(--brand-500);
  box-shadow: var(--focus-ring);
}

.select {
  appearance: none;
  cursor: pointer;
  background-color: var(--surface-raised);
  background-image: linear-gradient(var(--border), var(--border)),
          url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M6 8l4 4 4-4' stroke='%23647086' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 38px center, right 12px center;
  background-repeat: no-repeat, no-repeat;
  background-size: 1px 22px, 20px 20px;
  padding-right: 46px;
}

.select:hover {
  border-color: var(--border-strong);
  background-color: color-mix(in srgb, var(--surface-raised) 84%, var(--surface));
}

.select::-ms-expand {
  display: none;
}

html[data-theme="dark"] .select {
  background-image: linear-gradient(var(--border-strong), var(--border-strong)),
          url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M6 8l4 4 4-4' stroke='%23b1bac8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

html[data-theme="gray"] .select {
  background-image: linear-gradient(var(--border), var(--border)),
          url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M6 8l4 4 4-4' stroke='%235b6980' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.toolbar-side {
  justify-items: end;
  gap: 10px;
  min-width: 0;
  display: grid;
}

.toolbar-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  display: flex;
}

.toolbar-filter-launcher {
  border: 1px solid color-mix(in srgb, var(--brand-500) 20%, var(--border));
  background: color-mix(in srgb, var(--brand-50) 82%, var(--surface));
  border-radius: 16px;
  align-items: center;
  gap: 10px;
  width: auto;
  min-width: 0;
  max-width: 100%;
  min-height: 42px;
  padding: 5px 8px;
  display: inline-flex;
  overflow: hidden;
  box-shadow: 0 8px 22px #0f172a0b, inset 0 1px #ffffffe6;
}

.toolbar-filter-button {
  background: var(--surface-raised);
  min-height: 32px;
  color: var(--brand-700);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--brand-500) 16%, transparent);
  border: 0;
  border-radius: 11px;
  justify-content: center;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 780;
  line-height: 1;
  transition: transform .14s, background .14s, color .14s, box-shadow .14s;
  display: inline-flex;
}

.toolbar-filter-button:hover {
  box-shadow: 0 8px 18px color-mix(in srgb, var(--brand-600) 12%, transparent);
  background: #fff;
  transform: translateY(-1px);
}

.toolbar-filter-button:focus-visible {
  box-shadow: var(--focus-ring);
  outline: none;
}

.toolbar-filter-icon {
  background: color-mix(in srgb, var(--brand-600) 10%, transparent);
  width: 16px;
  height: 16px;
  color: var(--brand-700);
  border-radius: 6px;
  place-items: center;
  font-size: 11px;
  line-height: 1;
  display: inline-grid;
}

.toolbar-filter-summary {
  min-width: 0;
  max-width: 100%;
  color: var(--text-muted);
  text-overflow: clip;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  flex: 1 1 0;
  font-size: 12px;
  font-weight: 620;
  line-height: 1.12;
  display: block;
  overflow: hidden;
}

.toolbar-filter-summary.is-summary-wrap {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.22;
  overflow: visible;
}

.toolbar-filter-summary.is-summary-dense {
  font-size: 11px;
}

.toolbar-filter-summary.is-summary-extra-dense {
  font-size: 10px;
}

.search-modal {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  width: min(780px, 100vw - 32px);
  max-width: calc(100vw - 32px);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  margin: auto;
  padding: 0;
  overflow-x: hidden;
}

.search-modal::backdrop {
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  background: #0f172a70;
}

.search-modal-card {
  gap: 18px;
  min-width: 0;
  max-width: 100%;
  padding: 22px;
  display: grid;
  overflow-x: hidden;
}

.search-modal-header {
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  display: flex;
}

.search-modal-title {
  color: var(--heading);
  letter-spacing: -.03em;
  font-size: 22px;
  font-weight: 820;
  line-height: 1.15;
}

.search-modal-subtitle {
  color: var(--text-muted);
  margin-top: 6px;
  font-size: 13px;
}

.search-modal-close {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  width: 36px;
  height: 36px;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 12px;
  flex: none;
  place-items: center;
  padding: 0;
  font-size: 22px;
  line-height: 1;
  display: grid;
}

.search-modal-close:hover {
  border-color: var(--border-strong);
  background: var(--surface-raised);
  color: var(--text);
}

.search-modal-body {
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  display: grid;
  overflow-x: hidden;
}

.search-modal .toolbar-controls {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  min-width: 0;
  max-width: 100%;
}

.search-modal .search-field, .search-modal .input, .search-modal .select, .search-modal .filter-chips, .search-modal .material-filter-groups, .search-modal .filter-group {
  min-width: 0;
  max-width: 100%;
}

.search-modal .filter-group {
  flex: min(100%, 260px);
}

.search-modal .chip {
  white-space: normal;
  max-width: 100%;
}

.search-modal-footer {
  justify-content: flex-end;
  gap: 10px;
  padding-top: 2px;
  display: flex;
}

html[data-theme="gray"] .toolbar-filter-launcher {
  background: color-mix(in srgb, var(--surface-soft) 88%, white);
}

html[data-theme="dark"] .toolbar-filter-launcher {
  border-color: color-mix(in srgb, var(--brand-400) 22%, var(--border));
  background: color-mix(in srgb, var(--surface-soft) 90%, transparent);
  box-shadow: 0 8px 22px #0000002e, inset 0 1px #ffffff0d;
}

html[data-theme="dark"] .toolbar-filter-button {
  background: color-mix(in srgb, var(--brand-600) 16%, var(--surface-raised));
  color: #c8dcff;
}

html[data-theme="dark"] .toolbar-filter-button:hover {
  background: color-mix(in srgb, var(--brand-600) 24%, var(--surface-raised));
}

html[data-theme="dark"] .toolbar-filter-icon {
  color: #c8dcff;
  background: #ffffff14;
}

.materials-tab-panel[data-section-panel="cards"] > .toolbar, .materials-tab-panel[data-section-panel="suppliers"] > .toolbar {
  gap: 10px;
  padding: 14px 20px 10px;
}

.materials-tab-panel[data-section-panel="cards"] .toolbar-side, .materials-tab-panel[data-section-panel="suppliers"] .toolbar-side {
  width: 100%;
}

.materials-tab-panel[data-section-panel="cards"] .toolbar-actions, .materials-tab-panel[data-section-panel="suppliers"] .toolbar-actions {
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  min-width: 0;
}

.materials-tab-panel[data-section-panel="cards"] .toolbar-filter-launcher, .materials-tab-panel[data-section-panel="suppliers"] .toolbar-filter-launcher {
  flex: 1 1 0;
  justify-content: flex-start;
  width: 0;
  min-width: 0;
  max-width: none;
  margin-right: 0;
}

.materials-tab-panel[data-section-panel="cards"] .material-actions-mini, .materials-tab-panel[data-section-panel="suppliers"] .supplier-actions-mini {
  flex: none;
  margin-left: 0;
}

.material-actions-mini, .supplier-actions-mini {
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-soft) 92%, transparent);
  border-radius: 16px;
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
  width: fit-content;
  min-width: max-content;
  max-width: 100%;
  min-height: 42px;
  padding: 5px 8px 5px 12px;
  display: flex;
  box-shadow: 0 8px 22px #0f172a0b, inset 0 1px #ffffffe6;
}

.material-actions-label, .supplier-actions-label {
  color: var(--text-muted);
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.material-actions-group, .supplier-actions-group {
  align-items: center;
  gap: 4px;
  min-width: 0;
  display: flex;
}

.mini-action {
  color: #475467;
  cursor: pointer;
  white-space: nowrap;
  background: none;
  border: 0;
  border-radius: 11px;
  justify-content: center;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 720;
  line-height: 1;
  text-decoration: none;
  transition: background .16s, color .16s, transform .16s, box-shadow .16s;
  display: inline-flex;
}

.mini-action:hover {
  color: #3156d4;
  background: #eef2ff;
}

.mini-action:focus-visible {
  box-shadow: var(--focus-ring);
  outline: none;
}

.mini-action--primary {
  color: #fff;
  background: linear-gradient(135deg, #3156d4, #6678f0);
  box-shadow: 0 8px 18px #3156d438;
}

.mini-action--primary:hover {
  color: #fff;
  background: linear-gradient(135deg, #294dcc, #5f6feb);
}

.mini-action--muted {
  color: #667085;
}

.mini-action-icon {
  background: color-mix(in srgb, currentColor 9%, transparent);
  color: currentColor;
  border-radius: 6px;
  flex: none;
  place-items: center;
  width: 16px;
  height: 16px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  display: inline-grid;
}

.mini-action--primary .mini-action-icon {
  color: #fff;
  background: #ffffff2e;
}

.mini-divider {
  background: #d9e0ec;
  width: 1px;
  height: 22px;
  margin: 0 4px;
}

.mini-badge {
  color: #7a5200;
  background: #ffdd6e;
  border-radius: 999px;
  justify-content: center;
  align-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  display: inline-flex;
}

html[data-theme="gray"] .material-actions-mini, html[data-theme="gray"] .supplier-actions-mini {
  border-color: var(--border);
  background: color-mix(in srgb, var(--surface-soft) 88%, white);
}

html[data-theme="dark"] .material-actions-mini, html[data-theme="dark"] .supplier-actions-mini {
  border-color: var(--border);
  background: color-mix(in srgb, var(--surface-soft) 90%, transparent);
  box-shadow: 0 8px 22px #0000002e, inset 0 1px #ffffff0d;
}

html[data-theme="dark"] .mini-action {
  color: var(--text-muted);
}

html[data-theme="dark"] .mini-action-icon {
  background: #ffffff14;
}

html[data-theme="dark"] .mini-action:hover {
  color: #c8dcff;
  background: #6366f129;
}

html[data-theme="dark"] .mini-action--primary, html[data-theme="dark"] .mini-action--primary:hover {
  color: #fff;
}

html[data-theme="dark"] .mini-divider {
  background: var(--border-strong);
}

@media (max-width: 720px) {
  .material-actions-mini, .supplier-actions-mini {
    flex-wrap: wrap;
    width: 100%;
    min-width: 0;
    height: auto;
  }

  .material-actions-group, .supplier-actions-group {
    flex-wrap: wrap;
    flex: 100%;
  }

  .mini-action {
    flex: auto;
  }

  .mini-divider {
    display: none;
  }
}

@media (max-width: 1080px) {
  .materials-tab-panel[data-section-panel="cards"] .toolbar-actions, .materials-tab-panel[data-section-panel="suppliers"] .toolbar-actions {
    flex-wrap: wrap;
  }

  .materials-tab-panel[data-section-panel="cards"] .toolbar-filter-launcher, .materials-tab-panel[data-section-panel="suppliers"] .toolbar-filter-launcher {
    flex-basis: 100%;
    width: 100%;
  }
}

.filter-chips {
  flex-wrap: wrap;
  gap: 8px;
  display: flex;
}

.chip {
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface-raised);
  min-height: 32px;
  color: var(--text-muted);
  align-items: center;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 720;
  display: inline-flex;
}

.chip.active {
  background: var(--brand-600);
  color: #fff;
  border-color: var(--brand-600);
}

.material-filter-groups {
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
  display: flex;
}

.filter-group {
  border: 0;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  display: grid;
}

.filter-group legend {
  color: var(--text-soft);
  padding: 0;
  font-size: 11px;
  font-weight: 520;
  line-height: 1.2;
}

.chip-control {
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  gap: 8px;
  position: relative;
}

.chip-control .chip-input {
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  position: absolute;
}

.chip-mark {
  opacity: .72;
  border: 1.5px solid;
  border-radius: 50%;
  flex: none;
  width: 13px;
  height: 13px;
  position: relative;
}

.chip-control.checkbox .chip-mark {
  border-radius: 4px;
}

.chip-control.active {
  background: var(--brand-600);
  color: #fff;
  border-color: var(--brand-600);
}

.chip-control:has(.chip-input:checked) {
  background: var(--brand-600);
  color: #fff;
  border-color: var(--brand-600);
}

.chip-control.active .chip-mark {
  opacity: 1;
  box-shadow: inset 0 0 0 3px var(--brand-600);
  background: #fff;
  border-color: #fff;
}

.chip-control:has(.chip-input:checked) .chip-mark {
  opacity: 1;
  box-shadow: inset 0 0 0 3px var(--brand-600);
  background: #fff;
  border-color: #fff;
}

.chip-control.checkbox.active .chip-mark {
  box-shadow: none;
}

.chip-control.checkbox:has(.chip-input:checked) .chip-mark {
  box-shadow: none;
}

.chip-control.checkbox.active .chip-mark:before {
  content: "";
  border-right: 2px solid var(--brand-600);
  border-bottom: 2px solid var(--brand-600);
  width: 5px;
  height: 8px;
  position: absolute;
  top: 1px;
  left: 3px;
  transform: rotate(45deg);
}

.chip-control.checkbox:has(.chip-input:checked) .chip-mark:before {
  content: "";
  border-right: 2px solid var(--brand-600);
  border-bottom: 2px solid var(--brand-600);
  width: 5px;
  height: 8px;
  position: absolute;
  top: 1px;
  left: 3px;
  transform: rotate(45deg);
}

.chip-control:has(.chip-input:focus-visible) {
  border-color: var(--brand-500);
  box-shadow: var(--focus-ring);
}

.chip-control.is-disabled {
  opacity: .46;
  cursor: not-allowed;
}

.chip-control:has(.chip-input:disabled) {
  opacity: .46;
  cursor: not-allowed;
}

.filter-note {
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.35;
}

.material-card.is-filtered-out, .material-card[hidden], .material-card.is-page-hidden, .suppliers-table tbody tr.is-page-hidden {
  display: none;
}

.materials-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  display: grid;
}

.suppliers-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.suppliers-list + .suppliers-list, .pagination + .suppliers-list {
  margin-top: 20px;
}

.suppliers-workspace {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.suppliers-workspace-tabs {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-soft) 78%, transparent);
  gap: 8px;
  padding: 8px;
  display: flex;
}

.suppliers-workspace-tab {
  border: 1px solid var(--border);
  background: var(--surface-raised);
  min-height: 42px;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 12px;
  flex: 1 1 0;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  font-size: 14px;
  line-height: 1;
  transition: transform .14s, background .14s, border-color .14s, color .14s, box-shadow .14s;
  display: inline-flex;
  position: relative;
}

.suppliers-workspace-tab:hover {
  border-color: var(--border-strong);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.suppliers-workspace-tab:focus-visible {
  border-color: var(--brand-500);
  box-shadow: var(--focus-ring);
  outline: none;
}

.suppliers-workspace-tab[aria-selected="true"] {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #fff;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--brand-700) 18%, transparent);
}

.suppliers-workspace-tab[aria-selected="true"]:hover {
  background: var(--brand-700);
  border-color: var(--brand-700);
  color: #fff;
}

.suppliers-workspace-tab-count {
  border-radius: var(--radius-pill);
  color: #3f2b00;
  opacity: 1;
  background: #ffd75a;
  flex: none;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  animation: 1.85s ease-in-out infinite supplier-orders-count-pulse;
  display: inline-grid;
  box-shadow: 0 0 #ffd75a61, inset 0 1px #ffffff85, 0 3px 8px #7f560029;
}

.suppliers-workspace-tab[aria-selected="true"] .suppliers-workspace-tab-count {
  color: #3a2700;
  background: #ffe17d;
  box-shadow: 0 0 #ffe17d6b, inset 0 1px #ffffff9e, 0 4px 10px #7f56002e;
}

@keyframes supplier-orders-count-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 #ffd75a57, inset 0 1px #ffffff85, 0 3px 8px #7f560029;
  }

  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 8px #ffd75a00, inset 0 1px #ffffff9e, 0 5px 14px #7f560033;
  }
}

@media (prefers-reduced-motion: reduce) {
  .suppliers-workspace-tab-count {
    animation: none;
  }
}

.suppliers-workspace-panel {
  display: none;
}

.suppliers-workspace-panel.active {
  display: block;
}

.suppliers-list-in-workspace {
  box-shadow: none;
  background: none;
  border: 0;
  border-radius: 0;
}

.suppliers-workspace-panel .pagination {
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-soft) 58%, transparent);
  margin-top: 0;
  padding: 14px 18px;
}

.purchase-orders-table {
  min-width: 1080px;
}

.suppliers-list-header {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-soft) 72%, transparent);
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  display: flex;
}

.suppliers-list-title {
  color: var(--heading);
  letter-spacing: -.02em;
  font-size: 18px;
  font-weight: 780;
}

.suppliers-list-subtitle {
  color: var(--text-muted);
  margin-top: 4px;
  font-size: 13px;
}

.suppliers-table-scroll {
  overscroll-behavior-x: contain;
  overflow-x: auto;
}

.suppliers-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: 1180px;
}

.suppliers-table th, .suppliers-table td {
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  padding: 14px 16px;
}

.suppliers-table th {
  z-index: 1;
  background: var(--surface-raised);
  color: var(--text-soft);
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  font-size: 12px;
  position: sticky;
  top: 0;
}

.suppliers-table tbody tr {
  transition: background .14s;
}

.suppliers-table tbody tr:hover {
  background: var(--surface-soft);
}

.suppliers-table tbody tr:last-child td {
  border-bottom: 0;
}

.supplier-main, .supplier-contact, .supplier-terms, .supplier-delivery, .supplier-status-block {
  gap: 5px;
  min-width: 0;
  display: grid;
}

.supplier-name {
  color: var(--heading);
  letter-spacing: -.015em;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
}

.supplier-note, .supplier-muted {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}

.supplier-strong {
  color: var(--heading);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.35;
}

.supplier-materials {
  flex-wrap: wrap;
  gap: 6px;
  max-width: 260px;
  display: flex;
}

.supplier-tag {
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  min-height: 24px;
  color: var(--text-muted);
  white-space: nowrap;
  align-items: center;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 720;
  display: inline-flex;
}

.supplier-actions {
  flex-wrap: wrap;
  gap: 8px;
  min-width: 150px;
  display: flex;
}

.material-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  transition: transform .14s, box-shadow .14s, border-color .14s;
  display: flex;
}

.material-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.material-preview {
  border: 1px solid var(--border);
  background: radial-gradient(circle at 50% 42%, #ffffffb8, #0000 34px), linear-gradient(135deg, #e7e9ee, #cfd5df);
  border-radius: 16px;
  flex: 0 0 172px;
  min-height: 172px;
  position: relative;
  overflow: hidden;
}

html[data-theme="dark"] .material-preview {
  background: radial-gradient(circle at 50% 42%, #ffffff1f, transparent 34px),
          linear-gradient(135deg, var(--surface-soft), var(--border));
}

html[data-theme="gray"] .material-preview {
  background: radial-gradient(circle at 50% 42%, #ffffffbd, #0000 34px), linear-gradient(135deg, #f1f3f6, #dfe5ee);
}

.material-preview {
  contain: layout paint;
  isolation: isolate;
}

.material-preview:before, .alert-preview:before {
  content: "";
  z-index: 0;
  background-image: var(--material-preview-image, none);
  opacity: 0;
  pointer-events: none;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  transition: opacity .18s, transform .22s;
  position: absolute;
  inset: 0;
  transform: scale(1.02);
}

.material-preview.is-image-loaded:before, .alert-preview.is-image-loaded:before {
  opacity: 1;
  transform: scale(1);
}

.material-preview-img, .alert-preview-img {
  z-index: 0;
  object-fit: cover;
  opacity: 0;
  width: 100%;
  height: 100%;
  transition: opacity .18s, transform .22s;
  position: absolute;
  inset: 0;
  transform: scale(1.02);
}

.material-preview-img.is-loaded, .alert-preview-img.is-loaded {
  opacity: 1;
  transform: scale(1);
}

.material-preview > :not(.material-preview-img):not(.alert-preview-img), .alert-preview > :not(.material-preview-img):not(.alert-preview-img) {
  z-index: 1;
  position: relative;
}

.image-empty-state {
  z-index: 1;
  color: var(--text-soft);
  text-align: center;
  pointer-events: none;
  background: color-mix(in srgb, var(--surface-soft) 58%, transparent);
  place-content: center;
  place-items: center;
  gap: 4px;
  padding: 16px;
  display: none;
  position: absolute;
  inset: 0;
}

.image-empty-icon {
  color: color-mix(in srgb, var(--text-soft) 86%, var(--text-muted));
  font-size: 34px;
  font-weight: 360;
  line-height: .86;
}

.image-empty-text {
  letter-spacing: -.01em;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.12;
}

.alert-preview .image-empty-state {
  gap: 1px;
  padding: 4px;
}

.alert-preview .image-empty-icon {
  font-size: 21px;
  line-height: .82;
}

.alert-preview .image-empty-text {
  max-width: 48px;
  font-size: 8px;
  font-weight: 760;
  line-height: 1.05;
}

.material-preview.is-image-missing .image-empty-state, .alert-preview.is-image-missing .image-empty-state {
  display: grid;
}

.material-preview.is-image-loaded .image-empty-state, .alert-preview.is-image-loaded .image-empty-state {
  display: none;
}

.material-preview .badge {
  z-index: 2;
  position: absolute;
  top: 10px;
  left: 10px;
}

.material-menu {
  z-index: 2;
  color: #1c2433;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  background: #ffffffb3;
  border: 1px solid #ffffff47;
  border-radius: 10px;
  place-items: center;
  width: 32px;
  height: 32px;
  font-weight: 800;
  display: grid;
  position: absolute;
  top: 10px;
  right: 10px;
}

.material-title-row {
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  display: flex;
}

.material-card > .material-preview + div {
  height: 64px;
  min-height: 64px;
  overflow: hidden;
}

.material-title {
  -webkit-line-clamp: 2;
  color: var(--heading);
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  -webkit-box-orient: vertical;
  font-size: 16px;
  font-weight: 780;
  line-height: 1.25;
  display: -webkit-box;
  overflow: hidden;
}

.material-code {
  color: var(--text-soft);
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 4px;
  font-family: SF Mono, Consolas, monospace;
  font-size: 12px;
  overflow: hidden;
}

.material-category {
  color: var(--text-muted);
  white-space: nowrap;
  flex: none;
  font-size: 12px;
  font-weight: 740;
}

.stock-info {
  flex: none;
  gap: 9px;
  display: grid;
}

.stock-row {
  color: var(--text-muted);
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  display: flex;
}

.stock-row strong {
  color: var(--heading);
  font-weight: 780;
}

.progress {
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  height: 9px;
  overflow: hidden;
}

.progress-bar {
  border-radius: inherit;
  height: 100%;
}

.progress-good {
  background: linear-gradient(90deg, var(--success), #69d6a3);
  width: 84%;
}

.progress-warning {
  background: linear-gradient(90deg, var(--warning), #fb923c);
  width: 46%;
}

.progress-danger {
  background: linear-gradient(90deg, var(--danger), #ff8a9a);
  width: 18%;
}

.card-actions {
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: auto;
  display: grid;
}

.stock-modal {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  width: min(480px, 100vw - 32px);
  max-width: calc(100vw - 32px);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  margin: auto;
  padding: 0;
}

.stock-modal::backdrop {
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  background: #0f172a7a;
}

.stock-modal-card {
  gap: 16px;
  padding: 20px;
  display: grid;
}

.stock-modal-header {
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  display: flex;
}

.stock-modal-title {
  color: var(--heading);
  letter-spacing: -.02em;
  font-size: 20px;
  font-weight: 780;
}

.stock-modal-subtitle {
  color: var(--text-muted);
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.35;
}

.stock-modal-close {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  width: 34px;
  height: 34px;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 10px;
  flex: none;
  place-items: center;
  padding: 0;
  font-size: 20px;
  line-height: 1;
  display: grid;
}

.stock-modal-close:hover {
  border-color: var(--border-strong);
  background: var(--surface-raised);
  color: var(--text);
}

.stock-modal-form {
  gap: 14px;
  display: grid;
}

.stock-modal-field {
  gap: 7px;
  display: grid;
}

.stock-modal-label {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 760;
}

.stock-modal-current, .stock-modal-result {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  border-radius: 12px;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  display: flex;
}

.stock-modal-current span, .stock-modal-result span {
  color: var(--text-muted);
  font-size: 13px;
}

.stock-modal-current strong, .stock-modal-result strong {
  color: var(--heading);
  font-size: 16px;
  font-weight: 800;
}

.stock-modal-note {
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.35;
}

.stock-modal-actions {
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
  display: flex;
}

@media (max-width: 720px) {
  .stock-modal-actions {
    grid-template-columns: 1fr;
    display: grid;
  }
}

.badge {
  border-radius: var(--radius-pill);
  text-overflow: ellipsis;
  white-space: nowrap;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 26px;
  padding: 0 10px;
  font-size: 9px;
  font-weight: 400;
  display: inline-flex;
  overflow: hidden;
}

.badge-success {
  background: var(--success-soft);
  color: var(--success);
}

.badge-warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge-info {
  background: var(--info-soft);
  color: var(--info);
}

.badge-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.calendar-section .badge-danger, .alerts-section .badge-danger {
  background: color-mix(in srgb, var(--accent-500) 13%, transparent);
  color: var(--accent-500);
}

.badge-neutral {
  background: var(--surface-soft);
  color: var(--text-muted);
}

.dot {
  background: currentColor;
  border-radius: 50%;
  flex: none;
  width: 8px;
  height: 8px;
}

.empty-state {
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-xl);
  min-height: 340px;
  box-shadow: var(--shadow-sm);
  place-items: center;
  padding: 32px;
  display: none;
}

.empty-state h2 {
  color: var(--heading);
  letter-spacing: -.03em;
  margin: 0 0 8px;
  font-size: 26px;
}

.empty-state p {
  max-width: 460px;
  color: var(--text-muted);
  margin: 0 auto 18px;
}

.pagination {
  color: var(--text-muted);
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  font-size: 13px;
  display: flex;
}

.pagination-actions {
  gap: 8px;
  display: flex;
}

.pagination .btn:disabled {
  opacity: .46;
  cursor: not-allowed;
  transform: none;
}

.pagination .btn:disabled:hover {
  transform: none;
}

@media (max-width: 1560px) {
  .kpi-card {
    grid-template-rows: auto auto;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: center;
  }

  .kpi-card .month-map-wrap {
    grid-column: 2 / -1;
    justify-self: start;
    width: max-content;
    max-width: 100%;
    margin-top: 2px;
  }

  .kpi-card .month-map {
    grid-template-columns: repeat(7, 12px);
    grid-auto-rows: 12px;
    place-content: start;
    gap: 5px;
    width: max-content;
    max-width: 100%;
    padding: 12px;
  }

  .kpi-card .month-cell {
    aspect-ratio: auto;
    border-radius: 4px;
    width: 12px;
    height: 12px;
  }
}

@media (max-width: 1280px) {
  .alerts-section {
    grid-template-columns: 1fr;
  }

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

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

  .toolbar-controls {
    grid-template-columns: 1fr 1fr;
  }

  .suppliers-list-header {
    align-items: flex-start;
  }
}

@media (max-width: 1024px) {
  .app-shell {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .sidebar {
    width: 280px;
    padding: 18px;
  }

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

@media (max-width: 768px) {
  .app-shell {
    display: block;
  }

  .sidebar-toggle {
    display: inline-flex;
  }

  .sidebar-backdrop {
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s;
    display: block;
  }

  .sidebar {
    border-right: 1px solid #e2e8f0e6;
    width: min(320px, 100vw - 40px);
    height: 100vh;
    transition: transform .22s;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-104%);
    box-shadow: 22px 0 52px #0f172a33;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .main {
    padding-top: 76px;
  }
}

@media (max-width: 900px) {
  .calendar-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .materials-subtabs {
    border-radius: var(--radius-lg);
    grid-template-columns: 1fr;
    height: auto;
    display: grid;
    top: 8px;
  }

  .materials-subtabs-control {
    grid-template-columns: 1fr;
    height: auto;
  }

  .materials-subtab, .materials-subtab:not([aria-selected="true"]), .materials-subtab[aria-selected="true"] {
    width: 100%;
    min-height: 48px;
  }

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

  .alert-card {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .alert-preview {
    width: 54px;
  }

  .alert-action {
    grid-column: 1 / -1;
    justify-items: stretch;
  }

  .main {
    padding: 20px;
  }

  .page-header, .toolbar-top, .pagination, .suppliers-list-header {
    display: grid;
  }

  .header-actions {
    justify-content: stretch;
  }

  .btn {
    width: 100%;
  }

  .toolbar-side {
    justify-items: stretch;
  }

  .toolbar-actions {
    grid-template-columns: 1fr;
    display: grid;
  }

  .toolbar-filter-launcher {
    justify-content: space-between;
    width: 100%;
  }

  .toolbar-filter-summary {
    max-width: none;
  }

  .toolbar-filter-summary.is-summary-wrap {
    white-space: normal;
  }

  .search-modal-card {
    padding: 18px;
  }

  .search-modal-footer {
    grid-template-columns: 1fr;
    display: grid;
  }

  .toolbar-search-spoiler > summary {
    grid-template-rows: auto auto;
    grid-template-columns: minmax(0, 1fr) 28px;
    justify-content: stretch;
    gap: 4px 10px;
    min-height: 50px;
    padding: 8px 8px 8px 12px;
  }

  .toolbar-search-spoiler-title {
    grid-column: 1;
  }

  .toolbar-search-spoiler-hint {
    white-space: normal;
    grid-column: 1;
  }

  .toolbar-search-spoiler-chevron {
    grid-area: 1 / 2 / span 2;
    align-self: center;
  }

  .suppliers-workspace-tabs {
    grid-template-columns: 1fr;
    display: grid;
  }

  .suppliers-workspace-panel .pagination {
    padding: 14px;
  }

  .kpi-grid, .toolbar-controls, .materials-grid {
    grid-template-columns: 1fr;
  }

  .suppliers-table th, .suppliers-table td {
    padding: 12px;
  }

  .kpi-card {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .month-map-wrap {
    grid-column: 1 / -1;
    justify-self: stretch;
    width: 100%;
  }

  .month-map {
    grid-template-columns: repeat(7, 12px);
    grid-auto-rows: 12px;
    place-content: start space-between;
    gap: 5px 0;
    width: 100%;
    padding: 12px 16px;
  }

  .month-cell {
    aspect-ratio: auto;
    border-radius: 4px;
    width: 12px;
    height: 12px;
  }

  .pagination-actions {
    display: grid;
  }
}

/*# sourceMappingURL=apps_web_src_app_globals_10btyws.css.map*/