/* CCH Native V3 structural module CSS: modules/materialcenter/css/materialcenter.css
   Old visual skin removed. Uses core/css/cch-design-v3.css. */
body.cch-page-cch-materialcenter {
  --materialcenter-top: 24px;
  --cch-module-width-standard: 2400px;
}

.materialcenter-shell {
  margin: var(--materialcenter-top) auto 40px;
  display: grid;
  gap: 14px;
}

.materialcenter-hero {
  align-items: center !important;
  margin: 0 !important;
  padding: 18px 22px !important;
}

.materialcenter-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.materialcenter-logo {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
}

.materialcenter-logo img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.materialcenter-hero h1,
.materialcenter-module-head h2,
.materialcenter-picker-head h2 {
  margin: 0;
  letter-spacing: 0;
}

.materialcenter-hero h1 {
  margin-top: 5px !important;
  font-size: clamp(30px, 3vw, 46px) !important;
}

.materialcenter-hero .small {
  margin: 7px 0 0;
  max-width: 900px;
}

.materialcenter-hero .module-actions-admin {
  width: auto;
  display: flex;
  justify-content: flex-end;
}

.materialcenter-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
}

.materialcenter-tab {
  min-width: 0;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  white-space: nowrap;
}

.materialcenter-tab svg,
.materialcenter-option-icon svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.materialcenter-module-card {
  overflow: hidden;
  padding: 0 !important;
}

.materialcenter-module-head {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
}

.materialcenter-module-head h2 {
  margin-top: 4px;
  font-size: 1.25rem;
}

.materialcenter-module-actions,
.materialcenter-module-toolbar,
.materialcenter-module-toolbar .module-actions-admin,
.materialcenter-module-toolbar .inventar-hero-actions {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  width: auto !important;
  min-width: 0;
}

.materialcenter-module-toolbar:empty {
  display: none !important;
}

.materialcenter-module-toolbar button {
  width: auto !important;
  min-height: 38px;
  margin: 0;
  white-space: nowrap;
}

.materialcenter-module-body {
  min-height: 560px;
}

.materialcenter-empty,
.materialcenter-module-body.is-loading {
  min-height: 520px;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
}

.materialcenter-empty strong {
  font-size: 1.08rem;
}

.materialcenter-module-host {
  display: none;
}

.materialcenter-module-body.has-module .materialcenter-empty {
  display: none;
}

.materialcenter-module-body.has-module .materialcenter-module-host {
  display: block;
}

.materialcenter-module-host > :where(.wrap, main.wrap, .inventar-wrap) {
  margin: 0 !important;
  padding: 16px !important;
}

.materialcenter-module-host :where(.module-hero, .inventar-hero) {
  display: none !important;
}

.materialcenter-picker {
  position: fixed;
  inset: 0;
  z-index: 230000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(10px);
}

.materialcenter-picker.show {
  display: flex;
}

.materialcenter-picker-dialog {
  width: min(1000px, 100%) !important;
  padding: 0 !important;
}

.materialcenter-picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
}

.materialcenter-picker-head h2 {
  margin-top: 4px;
  font-size: 1.4rem;
}

.materialcenter-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 18px 22px 22px;
}

.materialcenter-option {
  min-height: 150px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  align-content: start;
  gap: 8px;
  padding: 15px;
  text-align: left;
}

.materialcenter-option-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
}

.materialcenter-option strong {
  font-size: .98rem;
}

.materialcenter-option span:last-child {
  font-size: 12px;
  line-height: 1.42;
}

@media (max-width: 1180px) {
.materialcenter-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.materialcenter-tabs {
  overflow-x: auto;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
}

.materialcenter-module-head {
  grid-template-columns: 1fr;
}

.materialcenter-module-actions,
  .materialcenter-module-toolbar,
  .materialcenter-module-toolbar .module-actions-admin,
  .materialcenter-module-toolbar .inventar-hero-actions {
  justify-content: flex-start;
}
}

@media (max-width: 760px) {
body.cch-page-cch-materialcenter {
  --materialcenter-top: 24px;
}

.materialcenter-shell {
  gap: 10px;
}

.materialcenter-hero {
  display: none !important;
}

.materialcenter-title {
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 11px;
}

.materialcenter-logo {
  width: 48px;
  height: 48px;
}

.materialcenter-logo img {
  width: 36px;
  height: 36px;
}

.materialcenter-hero .module-kicker,
  .materialcenter-hero .small {
  display: none;
}

.materialcenter-hero h1 {
  margin-top: 0 !important;
  font-size: 28px !important;
}

.materialcenter-hero .module-actions-admin {
  width: 100%;
}

.materialcenter-hero .module-actions-admin button {
  width: 100%;
}

.materialcenter-tabs {
  grid-template-columns: repeat(5, 48px);
  justify-content: space-between;
  gap: 6px;
  overflow: visible;
}

.materialcenter-tab {
  width: 48px;
  padding: 8px;
}

.materialcenter-tab span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.materialcenter-module-head {
  padding: 12px;
}

.materialcenter-module-actions,
  .materialcenter-module-toolbar,
  .materialcenter-module-toolbar .module-actions-admin,
  .materialcenter-module-toolbar .inventar-hero-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100% !important;
}

.materialcenter-module-actions {
  grid-template-columns: 1fr;
}

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

.materialcenter-module-toolbar button,
  .materialcenter-module-actions > button {
  width: 100% !important;
}

.materialcenter-module-host > :where(.wrap, main.wrap, .inventar-wrap) {
  padding: 10px !important;
}

.materialcenter-picker {
  padding: 10px;
}

.materialcenter-picker-dialog {
  max-height: calc(100dvh - 20px) !important;
}

.materialcenter-picker-head {
  padding: 14px;
}

.materialcenter-options {
  grid-template-columns: 1fr;
  padding: 12px 14px 16px;
}

.materialcenter-option {
  min-height: 0;
  grid-template-columns: 38px minmax(0, 1fr);
  grid-template-rows: auto auto;
}

.materialcenter-option-icon {
  grid-row: 1 / 3;
}
}

body[data-materialcenter-view="materials"] #newStockBtn,
body[data-materialcenter-view="materials"] #printBtn,
body[data-materialcenter-view="materials"] #stockListSection,
body[data-materialcenter-view="materials"] [data-stock-stat] {
  display: none !important;
}

body[data-materialcenter-view="stock"] #newMaterialBtn,
body[data-materialcenter-view="stock"] #materialCompletionSection,
body[data-materialcenter-view="stock"] #materialDuplicateSection,
body[data-materialcenter-view="stock"] #materialLibrarySection,
body[data-materialcenter-view="stock"] [data-material-stat] {
  display: none !important;
}

body[data-materialcenter-view="materials"] .stats {
  grid-template-columns: repeat(3,minmax(0,1fr)) !important;
}

body[data-materialcenter-view="stock"] .stats {
  grid-template-columns: repeat(5,minmax(0,1fr)) !important;
}

@media (max-width:800px) {
body[data-materialcenter-view="materials"] .stats,
 body[data-materialcenter-view="stock"] .stats {
  grid-template-columns: repeat(2,minmax(0,1fr)) !important;
}
}

/* ============================================================
   Materialcenter V3.0 shell
   ============================================================ */
body.cch-page-cch-materialcenter {
  --mc-bg: #07131e;
  --mc-surface: #0b1d2b;
  --mc-surface-2: #102638;
  --mc-surface-3: #143248;
  --mc-border: rgba(116, 171, 205, .20);
  --mc-border-strong: rgba(65, 196, 245, .42);
  --mc-text: #f4f8fb;
  --mc-muted: #93a9b9;
  --mc-accent: #27c2f3;
  --mc-danger: #ff667a;
  --mc-radius: 18px;
  --cch-module-width-standard: 2480px;
}

body.cch-page-cch-materialcenter .materialcenter-shell {
  width: min(var(--cch-module-width-standard), calc(100vw - 32px));
  max-width: none;
  margin: 18px auto 36px;
  gap: 12px;
}

body.cch-page-cch-materialcenter .materialcenter-hero {
  min-height: 72px;
  padding: 14px 18px !important;
  border: 1px solid var(--mc-border);
  border-radius: var(--mc-radius);
  background: linear-gradient(135deg, rgba(16, 43, 62, .95), rgba(8, 25, 38, .97));
  box-shadow: 0 18px 50px rgba(0, 0, 0, .18);
}

body.cch-page-cch-materialcenter .materialcenter-title {
  grid-template-columns: 4px minmax(0, 1fr);
  gap: 14px;
}

body.cch-page-cch-materialcenter .materialcenter-logo {
  width: 4px;
  height: 46px;
  border-radius: 999px;
  background: var(--mc-accent);
  box-shadow: 0 0 24px rgba(39, 194, 243, .28);
}

body.cch-page-cch-materialcenter .materialcenter-logo img { display: none; }
body.cch-page-cch-materialcenter .materialcenter-hero .module-kicker { display: none; }
body.cch-page-cch-materialcenter .materialcenter-hero h1 {
  margin: 0 !important;
  font-size: clamp(24px, 2.1vw, 34px) !important;
  line-height: 1.05;
}
body.cch-page-cch-materialcenter .materialcenter-hero .small {
  margin-top: 5px;
  color: var(--mc-muted);
}

body.cch-page-cch-materialcenter .materialcenter-tabs {
  display: flex;
  grid-template-columns: none;
  gap: 8px;
  overflow-x: auto;
  padding: 6px;
  border: 1px solid var(--mc-border);
  border-radius: 15px;
  background: rgba(8, 25, 38, .78);
}

body.cch-page-cch-materialcenter .materialcenter-tab {
  flex: 1 1 0;
  min-width: 150px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--mc-muted);
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
body.cch-page-cch-materialcenter .materialcenter-tab:hover {
  color: var(--mc-text);
  background: rgba(20, 50, 72, .58);
}
body.cch-page-cch-materialcenter .materialcenter-tab.active {
  color: var(--mc-text);
  border-color: var(--mc-border-strong);
  background: linear-gradient(180deg, rgba(29, 76, 104, .88), rgba(17, 50, 72, .88));
  box-shadow: inset 0 -2px 0 var(--mc-accent);
}

body.cch-page-cch-materialcenter .materialcenter-module-card {
  border: 1px solid var(--mc-border);
  border-radius: var(--mc-radius);
  background: rgba(8, 25, 38, .86);
  box-shadow: 0 20px 60px rgba(0,0,0,.16);
}
body.cch-page-cch-materialcenter .materialcenter-module-head {
  min-height: 60px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--mc-border);
  background: rgba(15, 41, 59, .58);
}
body.cch-page-cch-materialcenter .materialcenter-module-head .module-kicker {
  color: var(--mc-accent);
  font-size: 10px;
  letter-spacing: .08em;
}
body.cch-page-cch-materialcenter .materialcenter-module-head h2 { font-size: 1.15rem; }
body.cch-page-cch-materialcenter .materialcenter-module-body { min-height: 500px; }
body.cch-page-cch-materialcenter .materialcenter-module-host > :where(.wrap, main.wrap, .inventar-wrap) {
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box;
  padding: 16px !important;
}

body.cch-page-cch-materialcenter .materialcenter-picker { background: rgba(2, 10, 16, .76); }
body.cch-page-cch-materialcenter .materialcenter-picker-dialog {
  border: 1px solid var(--mc-border-strong);
  border-radius: 20px;
  overflow: hidden;
  background: #0a1b29;
}
body.cch-page-cch-materialcenter .materialcenter-picker-head {
  border-bottom: 1px solid var(--mc-border);
  background: rgba(18, 48, 69, .62);
}
body.cch-page-cch-materialcenter .materialcenter-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
body.cch-page-cch-materialcenter .materialcenter-option {
  min-height: 132px;
  border: 1px solid var(--mc-border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(16, 40, 57, .88), rgba(10, 27, 40, .92));
  color: var(--mc-text);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
body.cch-page-cch-materialcenter .materialcenter-option:hover,
body.cch-page-cch-materialcenter .materialcenter-option.active {
  transform: translateY(-2px);
  border-color: var(--mc-border-strong);
  background: linear-gradient(180deg, rgba(20, 58, 80, .96), rgba(11, 34, 50, .96));
}
body.cch-page-cch-materialcenter .materialcenter-option-icon {
  color: var(--mc-accent);
  border: 1px solid rgba(39, 194, 243, .22);
  border-radius: 11px;
  background: rgba(39, 194, 243, .08);
}

@media (max-width: 860px) {
  body.cch-page-cch-materialcenter .materialcenter-shell { width: calc(100vw - 16px); margin-top: 8px; }
  body.cch-page-cch-materialcenter .materialcenter-hero { display: flex !important; flex-direction: column; align-items: stretch !important; }
  body.cch-page-cch-materialcenter .materialcenter-hero .small { display: block; }
  body.cch-page-cch-materialcenter .materialcenter-hero .module-actions-admin button { width: auto; }
  body.cch-page-cch-materialcenter .materialcenter-tabs { justify-content: flex-start; }
  body.cch-page-cch-materialcenter .materialcenter-tab { flex: 0 0 auto; min-width: 54px; }
  body.cch-page-cch-materialcenter .materialcenter-tab span { position: static; width: auto; height: auto; clip: auto; overflow: visible; }
  body.cch-page-cch-materialcenter .materialcenter-options { grid-template-columns: 1fr; }
}
