/* ==========================================================================
   17-artikeldatenbank.css
   Artikel-Datenbank eigener Bereich
   Step198: sauberer Neuaufbau für Übersicht + Detailseite
   ========================================================================== */

/* ==========================================================================
   Grundfläche
   ========================================================================== */

html body #database-view,
html body #database-view[style],
html body #database-view[style*="display:block"],
html body #database-view[style*="display: block"] {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    color: #edf6ff !important;
}

html body #database-view::before,
html body #database-view::after {
    content: none !important;
    display: none !important;
}

/* Auf der Datenbankseite keine globale extra Fußzeile außerhalb anzeigen. */
html body:has(#database-view[style*="display: block"]) #global-app-footer,
html body:has(#database-view[style*="display:block"]) #global-app-footer {
    display: none !important;
}

/* ==========================================================================
   Artikeldatenbank Übersicht mit Produktionskacheln
   ========================================================================== */

html body #database-view #db-bereich-dashboard {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 18px 18px 0 !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    position: relative !important;
    isolation: isolate !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 18px !important;
    min-height: calc(100vh - 260px) !important;
    background:
        radial-gradient(1050px 420px at 12% 0%, rgba(255,255,255,0.075), transparent 46%),
        radial-gradient(900px 420px at 92% 100%, rgba(94, 132, 191, 0.08), transparent 52%),
        repeating-linear-gradient(126deg, rgba(255,255,255,0.008) 0 2px, rgba(255,255,255,0) 2px 18px),
        linear-gradient(135deg, rgba(12, 46, 84, 0.98), rgba(7, 30, 59, 0.99) 48%, rgba(5, 24, 49, 0.99)) !important;
    border: 1px solid rgba(116, 171, 238, 0.46) !important;
    outline: 0 !important;
    box-shadow:
        0 18px 42px rgba(0,0,0,0.24),
        inset 0 0 0 1px rgba(255,255,255,0.035),
        inset 0 1px 0 rgba(255,255,255,0.075),
        inset 0 -1px 0 rgba(155, 198, 246, 0.07) !important;
}

html body #database-view #db-bereich-dashboard::before,
html body #database-view #db-bereich-dashboard::after {
    content: none !important;
    display: none !important;
}

html body #database-view .db-backup-toolbar {
    border-radius: 14px !important;
    padding: 16px 18px !important;
    border: 1px solid rgba(90, 151, 224, 0.34) !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.015) 18%, transparent 19%),
        linear-gradient(135deg, rgba(9, 42, 82, 0.94), rgba(7, 32, 63, 0.98)) !important;
    color: #eef7ff !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.08),
        0 12px 24px rgba(0,0,0,0.16) !important;
    overflow: hidden !important;
    background-clip: padding-box !important;
}

html body #database-view .db-backup-toolbar strong {
    display: block !important;
    color: #f7fbff !important;
    font-size: 16px !important;
    font-weight: 780 !important;
    letter-spacing: -0.012em !important;
}

html body #database-view .db-backup-toolbar small {
    display: block !important;
    margin-top: 5px !important;
    color: rgba(218, 232, 249, 0.72) !important;
    font-weight: 500 !important;
}

html body #database-view .db-backup-toolbar .header-btn {
    border-radius: 12px !important;
    min-height: 40px !important;
    border: 1px solid rgba(103, 166, 242, 0.38) !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02) 20%, transparent 21%),
        linear-gradient(135deg, rgba(18, 71, 135, 0.86), rgba(9, 43, 89, 0.94)) !important;
    color: #eaf4ff !important;
    font-weight: 720 !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.10),
        0 10px 20px rgba(0,0,0,0.14) !important;
}

html body #database-view #db-bereich-dashboard > p {
    margin: 0 !important;
    padding: 0 4px !important;
    color: rgba(223, 235, 250, 0.78) !important;
    font-size: 13px !important;
    font-weight: 560 !important;
}

html body #database-view #db-dashboard {
    flex: 1 1 auto !important;
    width: 100% !important;
    max-width: none !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 16px !important;
    align-content: start !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

html body #database-view #db-dashboard .kachel {
    min-height: 178px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 24px 18px !important;
    border-radius: 16px !important;
    border: 1px solid rgba(117, 166, 221, 0.34) !important;
    background:
        linear-gradient(135deg, rgba(4, 17, 35, 0.54), rgba(5, 21, 42, 0.62)),
        radial-gradient(420px 200px at 14% 0%, rgba(255,255,255,0.16), transparent 54%),
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01) 18%, transparent 19%),
        url("../images/artikeldatenbank/artikeldatenbank-kachel-bg.png") center center / cover no-repeat !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.09),
        inset 0 -1px 0 rgba(139, 184, 238, 0.12),
        0 14px 26px rgba(0,0,0,0.18) !important;
    color: #f4fbff !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    transition: transform .15s ease, filter .15s ease, box-shadow .15s ease !important;
    overflow: hidden !important;
    background-clip: padding-box !important;
    position: relative !important;
    isolation: isolate !important;
}

html body #database-view #db-dashboard .kachel::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    border-radius: inherit !important;
    background:
        linear-gradient(135deg, rgba(6, 28, 56, 0.40), rgba(4, 19, 38, 0.18) 44%, rgba(2, 10, 23, 0.50)),
        radial-gradient(360px 180px at 82% 38%, rgba(125, 169, 230, 0.12), transparent 60%),
        radial-gradient(220px 120px at 20% 15%, rgba(255,255,255,0.08), transparent 60%) !important;
    pointer-events: none !important;
    z-index: 0 !important;
}

html body #database-view #db-dashboard .kachel > * {
    position: relative !important;
    z-index: 1 !important;
}

html body #database-view #db-dashboard .kachel:hover {
    transform: translateY(-2px) !important;
    filter: brightness(1.05) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.11),
        inset 0 -1px 0 rgba(157, 201, 248, 0.16),
        0 18px 34px rgba(0,0,0,0.24),
        0 0 20px rgba(111, 164, 232, 0.10) !important;
}

html body #database-view #db-dashboard .kachel h2 {
    margin: 0 !important;
    color: #f5f9ff !important;
    font-size: 20px !important;
    font-weight: 780 !important;
    letter-spacing: -0.01em !important;
    text-shadow: 0 2px 10px rgba(0,0,0,0.34) !important;
}

html body #database-view #db-dashboard .kachel p {
    margin: 10px 0 0 !important;
    color: rgba(227, 236, 247, 0.82) !important;
    font-size: 12px !important;
    font-weight: 520 !important;
}

/* ==========================================================================
   Fußzeile Übersicht
   ========================================================================== */

html body #database-view .database-modern-footer {
    width: 100% !important;
    min-height: 54px !important;
    height: 54px !important;
    margin: auto 0 0 !important;
    padding: 0 22px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(83, 140, 210, 0.30) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 90px !important;
    overflow: hidden !important;
    color: rgba(229, 240, 255, 0.90) !important;
    font-size: 12px !important;
    font-weight: 720 !important;
    letter-spacing: -0.005em !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02) 18%, transparent 19%),
        radial-gradient(820px 160px at 22% 0%, rgba(255,255,255,0.06), transparent 58%),
        linear-gradient(135deg, rgba(10, 42, 79, 0.94), rgba(6, 28, 55, 0.97)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.07),
        inset 0 -1px 0 rgba(142, 188, 245, 0.05),
        0 10px 20px rgba(0,0,0,0.14) !important;
}

html body #database-view .database-modern-footer::before,
html body #database-view .database-modern-footer::after {
    content: none !important;
    display: none !important;
}

/* ==========================================================================
   Detailseite: Zielbild-Finish
   ========================================================================== */

/* Wenn Detail offen ist, muss die Produktionsübersicht vollständig weg. */
html body #database-view:has(#db-content-area[style*="display:block"]) #db-bereich-dashboard,
html body #database-view:has(#db-content-area[style*="display: block"]) #db-bereich-dashboard {
    display: none !important;
}

html body #database-view #db-content-area[style*="display:none"],
html body #database-view #db-content-area[style*="display: none"] {
    display: none !important;
}

html body #database-view #db-content-area[style*="display:block"],
html body #database-view #db-content-area[style*="display: block"] {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-height: calc(100vh - 180px) !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background:
        radial-gradient(900px 360px at 90% 0%, rgba(60, 144, 230, 0.14), transparent 50%),
        radial-gradient(800px 320px at 15% 12%, rgba(160, 190, 230, 0.07), transparent 48%),
        linear-gradient(135deg, rgba(3, 16, 34, 0.98), rgba(4, 25, 51, 0.98) 48%, rgba(2, 13, 29, 0.98)) !important;
    color: #edf6ff !important;
    overflow: visible !important;
}

html body #database-view #db-content-area::before,
html body #database-view #db-content-area::after {
    content: none !important;
    display: none !important;
}

html body #database-view .artikel-db-detail-shell {
    width: 100% !important;
    max-width: none !important;
    min-height: calc(100vh - 180px) !important;
    box-sizing: border-box !important;
    padding: 22px 24px 18px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    background:
        radial-gradient(900px 340px at 96% 3%, rgba(53, 141, 234, 0.18), transparent 52%),
        radial-gradient(620px 240px at 6% 0%, rgba(255,255,255,0.06), transparent 52%),
        repeating-linear-gradient(126deg, rgba(255,255,255,0.006) 0 2px, rgba(255,255,255,0) 2px 18px) !important;
}

/* Optionaler Titelblock bleibt vorhanden, wird aber nicht zusätzlich groß gemacht,
   weil der Haupt-Header der App bereits Artikel-Datenbank zeigt. */
html body #database-view .artikel-db-page-title {
    display: none !important;
}

/* Premium Karten */
html body #database-view .artikel-db-card {
    position: relative !important;
    overflow: hidden !important;
    border-radius: 16px !important;
    border: 1px solid rgba(109, 174, 252, 0.38) !important;
    background:
        radial-gradient(720px 240px at 90% 0%, rgba(65, 145, 228, 0.12), transparent 55%),
        radial-gradient(520px 180px at 8% 0%, rgba(255,255,255,0.055), transparent 52%),
        linear-gradient(135deg, rgba(7, 33, 66, 0.92), rgba(4, 22, 47, 0.96)) !important;
    box-shadow:
        0 18px 40px rgba(0,0,0,0.22),
        inset 0 1px 0 rgba(255,255,255,0.08),
        inset 0 -1px 0 rgba(133, 184, 242, 0.06) !important;
}

html body #database-view .artikel-db-card::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    pointer-events: none !important;
    background:
        linear-gradient(115deg, rgba(255,255,255,0.018) 0%, rgba(255,255,255,0.062) 19%, rgba(255,255,255,0.012) 38%, transparent 56%),
        repeating-linear-gradient(126deg, rgba(255,255,255,0.006) 0 2px, rgba(255,255,255,0) 2px 18px) !important;
    opacity: 0.86 !important;
    z-index: 0 !important;
}

html body #database-view .artikel-db-card > * {
    position: relative !important;
    z-index: 1 !important;
}

html body #database-view .artikel-db-details-card {
    padding: 18px 20px 20px !important;
}

html body #database-view .artikel-db-table-card {
    padding: 18px 18px 14px !important;
    flex: 1 1 auto !important;
}

/* Section Header */
html body #database-view .artikel-db-section-head {
    display: flex !important;
    align-items: center !important;
    gap: 11px !important;
    margin-bottom: 16px !important;
}

html body #database-view .artikel-db-section-icon {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #b9ddff !important;
    font-size: 17px !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.11), rgba(255,255,255,0.02) 22%, transparent 23%),
        linear-gradient(135deg, rgba(18, 83, 154, 0.90), rgba(8, 48, 99, 0.96)) !important;
    border: 1px solid rgba(100, 170, 246, 0.34) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 8px 18px rgba(0,0,0,0.16) !important;
}

html body #database-view .artikel-db-section-head h3 {
    margin: 0 !important;
    color: #f5f9ff !important;
    font-size: 19px !important;
    line-height: 1 !important;
    font-weight: 780 !important;
    letter-spacing: 0.035em !important;
    text-transform: uppercase !important;
}

/* Formularstruktur */
html body #database-view .artikel-db-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
}

html body #database-view .artikel-db-form-row {
    gap: 18px !important;
    align-items: end !important;
}

/* WICHTIG: Versteckte Struktur-Gruppe bleibt wirklich weg. */
html body #database-view #db-feste-gruppe[style*="display:none"],
html body #database-view #db-feste-gruppe[style*="display: none"],
html body #database-view #db-flexible-gruppe[style*="display:none"],
html body #database-view #db-flexible-gruppe[style*="display: none"] {
    display: none !important;
}

/* Erste Zeile immer als Grid */
html body #database-view .artikel-db-form-row-top {
    display: grid !important;
    grid-template-columns: 1.15fr 1.10fr 0.92fr 0.96fr 0.98fr !important;
}

/* Standard/feste Rahmen-Gruppe: nur diese Felder sichtbar */
html body #database-view #db-feste-gruppe:not([style*="display:none"]):not([style*="display: none"]),
html body #database-view #db-feste-gruppe[style*="display:flex"],
html body #database-view #db-feste-gruppe[style*="display: flex"],
html body #database-view #db-feste-gruppe[style*="display:block"],
html body #database-view #db-feste-gruppe[style*="display: block"] {
    display: grid !important;
    grid-template-columns: 0.95fr 1.40fr 0.90fr 0.90fr 0.72fr 0.72fr 0.92fr !important;
}

/* Variable Artikel-Gruppe: nur wenn JS sie öffnet */
html body #database-view #db-flexible-gruppe[style*="display:flex"],
html body #database-view #db-flexible-gruppe[style*="display: flex"],
html body #database-view #db-flexible-gruppe[style*="display:block"],
html body #database-view #db-flexible-gruppe[style*="display: block"] {
    display: grid !important;
    grid-template-columns: 0.95fr 1.25fr 1.65fr 0.72fr 0.72fr 0.92fr !important;
}

html body #database-view .artikel-db-form .admin-form-group {
    min-width: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 7px !important;
}

html body #database-view .artikel-db-form label {
    color: rgba(185, 212, 244, 0.88) !important;
    font-size: 12px !important;
    line-height: 1 !important;
    font-weight: 760 !important;
    letter-spacing: 0.055em !important;
    text-transform: uppercase !important;
}

html body #database-view .artikel-db-form input,
html body #database-view .artikel-db-form select,
html body #database-view .artikel-db-table-tools input,
html body #database-view .artikel-db-table-tools select {
    width: 100% !important;
    height: 40px !important;
    min-height: 40px !important;
    box-sizing: border-box !important;
    border-radius: 7px !important;
    border: 1px solid rgba(99, 153, 218, 0.36) !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.00) 28%),
        rgba(2, 18, 39, 0.62) !important;
    color: #eef7ff !important;
    font-size: 14px !important;
    font-weight: 520 !important;
    padding: 0 14px !important;
    outline: none !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 8px 14px rgba(0,0,0,0.08) !important;
}

html body #database-view .artikel-db-form input::placeholder,
html body #database-view .artikel-db-table-tools input::placeholder {
    color: rgba(208, 224, 244, 0.52) !important;
}

html body #database-view .artikel-db-form input:focus,
html body #database-view .artikel-db-form select:focus,
html body #database-view .artikel-db-table-tools input:focus,
html body #database-view .artikel-db-table-tools select:focus {
    border-color: rgba(76, 159, 255, 0.72) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 0 0 3px rgba(43, 134, 249, 0.12) !important;
}

/* Speichern-Button wie Zielbild */
html body #database-view .artikel-db-save-btn {
    width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 18px !important;
    border-radius: 10px !important;
    border: 1px solid rgba(113, 200, 255, 0.78) !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 820 !important;
    letter-spacing: 0.035em !important;
    text-transform: uppercase !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.20), rgba(255,255,255,0.04) 20%, transparent 21%),
        linear-gradient(135deg, #1d8cff 0%, #005bd9 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.25),
        0 0 28px rgba(20, 122, 255, 0.50),
        0 12px 24px rgba(0,0,0,0.20) !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 9px !important;
}

html body #database-view .artikel-db-save-btn .artikel-db-save-icon {
    font-size: 13px !important;
    line-height: 1 !important;
    color: #ffffff !important;
    filter: drop-shadow(0 0 6px rgba(255,255,255,0.35)) !important;
}

/* Unterkomponenten */
html body #database-view #db-komponenten-inputs-list {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 7px !important;
    min-height: 40px !important;
}

html body #database-view .copy-btn {
    border-radius: 7px !important;
    border: 1px solid rgba(125, 177, 232, 0.36) !important;
    background: rgba(125, 145, 165, 0.52) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
}

/* Tabellenheader/Tools */
html body #database-view .artikel-db-table-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 18px !important;
    margin-bottom: 14px !important;
}

html body #database-view .artikel-db-table-header .artikel-db-section-head {
    margin-bottom: 0 !important;
}

html body #database-view .artikel-db-table-tools {
    display: grid !important;
    grid-template-columns: minmax(180px, 240px) minmax(260px, 450px) !important;
    gap: 14px !important;
    align-items: center !important;
    min-width: min(100%, 650px) !important;
}

/* Tabelle komplett überschreiben: kein altes Grau mehr */
html body #database-view .artikel-db-table-wrap {
    width: 100% !important;
    overflow: auto !important;
    border-radius: 12px !important;
    border: 1px solid rgba(92, 148, 213, 0.28) !important;
    background: rgba(3, 17, 38, 0.54) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05) !important;
}

html body #database-view .artikel-db-table-wrap table,
html body #database-view #db-content-area table {
    width: 100% !important;
    min-width: 1280px !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    color: #edf6ff !important;
    background: transparent !important;
    table-layout: fixed !important;
}

html body #database-view .artikel-db-table-wrap thead,
html body #database-view .artikel-db-table-wrap thead tr,
html body #database-view .artikel-db-table-wrap thead th,
html body #database-view #db-content-area table thead,
html body #database-view #db-content-area table thead tr,
html body #database-view #db-content-area table thead th {
    background:
        linear-gradient(180deg, rgba(21, 66, 112, 0.96), rgba(10, 43, 82, 0.96)) !important;
    color: rgba(224, 239, 255, 0.96) !important;
}

html body #database-view .artikel-db-table-wrap th,
html body #database-view #db-content-area table th {
    height: 43px !important;
    padding: 0 14px !important;
    text-align: left !important;
    color: rgba(224, 239, 255, 0.96) !important;
    font-size: 12px !important;
    font-weight: 790 !important;
    letter-spacing: 0.045em !important;
    text-transform: uppercase !important;
    border-right: 1px solid rgba(98, 150, 210, 0.18) !important;
    border-bottom: 1px solid rgba(103, 162, 229, 0.30) !important;
    white-space: nowrap !important;
}

html body #database-view .artikel-db-table-wrap tbody tr,
html body #database-view #db-table-body tr {
    background: transparent !important;
}

html body #database-view .artikel-db-table-wrap tbody tr td,
html body #database-view #db-content-area table tbody tr td,
html body #database-view #db-table-body tr td {
    min-height: 54px !important;
    padding: 13px 14px !important;
    color: rgba(231, 241, 255, 0.92) !important;
    font-size: 13px !important;
    line-height: 1.38 !important;
    font-weight: 520 !important;
    vertical-align: middle !important;
    border-right: 1px solid rgba(98, 150, 210, 0.13) !important;
    border-bottom: 1px solid rgba(98, 150, 210, 0.15) !important;
    background: rgba(3, 22, 47, 0.74) !important;
}

html body #database-view .artikel-db-table-wrap tbody tr:nth-child(even) td,
html body #database-view #db-table-body tr:nth-child(even) td {
    background: rgba(10, 35, 68, 0.78) !important;
}

html body #database-view .artikel-db-table-wrap tbody tr:nth-child(odd) td,
html body #database-view #db-table-body tr:nth-child(odd) td {
    background: rgba(4, 24, 52, 0.76) !important;
}

html body #database-view .artikel-db-table-wrap tbody tr:hover td,
html body #database-view #db-table-body tr:hover td {
    background: rgba(16, 55, 96, 0.86) !important;
}

html body #database-view .artikel-db-table-wrap td:first-child,
html body #database-view #db-table-body td:first-child {
    font-weight: 760 !important;
    color: #f4f9ff !important;
}

html body #database-view .artikel-db-table-wrap th:last-child,
html body #database-view .artikel-db-table-wrap td:last-child,
html body #database-view #db-table-body td:last-child {
    text-align: center !important;
    border-right: 0 !important;
}

/* Action-Buttons im Tabellenbereich endgültig überschreiben */
html body #database-view #db-table-body td:last-child button,
html body #database-view .artikel-db-table-wrap td:last-child button {
    min-width: 46px !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 12px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 790 !important;
    border: 1px solid rgba(95, 169, 255, 0.45) !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.13), rgba(255,255,255,0.02) 20%, transparent 21%),
        linear-gradient(135deg, rgba(16, 93, 178, 0.96), rgba(6, 55, 122, 0.98)) !important;
    color: #f4fbff !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.13), 0 8px 14px rgba(0,0,0,0.14) !important;
}

html body #database-view #db-table-body td:last-child button:last-child,
html body #database-view .artikel-db-table-wrap td:last-child button:last-child {
    min-width: 30px !important;
    width: 30px !important;
    padding: 0 !important;
    border-color: rgba(255, 93, 105, 0.48) !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.13), rgba(255,255,255,0.02) 20%, transparent 21%),
        linear-gradient(135deg, rgba(135, 24, 38, 0.94), rgba(83, 14, 25, 0.98)) !important;
    color: #ffd7dc !important;
}

/* Footer im Detail */
html body #database-view #db-content-area .database-modern-footer {
    width: 100% !important;
    height: 54px !important;
    min-height: 54px !important;
    margin: auto 0 0 !important;
    padding: 0 22px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(83, 140, 210, 0.30) !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02) 18%, transparent 19%),
        radial-gradient(820px 160px at 22% 0%, rgba(255,255,255,0.06), transparent 58%),
        linear-gradient(135deg, rgba(10, 42, 79, 0.94), rgba(6, 28, 55, 0.97)) !important;
}

/* Responsive Schutz */
@media (max-width: 1500px) {
    html body #database-view .artikel-db-form-row-top {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    html body #database-view #db-feste-gruppe:not([style*="display:none"]):not([style*="display: none"]),
    html body #database-view #db-feste-gruppe[style*="display:flex"],
    html body #database-view #db-feste-gruppe[style*="display: flex"],
    html body #database-view #db-flexible-gruppe[style*="display:flex"],
    html body #database-view #db-flexible-gruppe[style*="display: flex"] {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 980px) {
    html body #database-view #db-dashboard {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    html body #database-view .database-modern-footer {
        flex-direction: column !important;
        gap: 4px !important;
        text-align: center !important;
    }

    html body #database-view .artikel-db-detail-shell {
        padding: 14px !important;
    }

    html body #database-view .artikel-db-form-row-top,
    html body #database-view #db-feste-gruppe,
    html body #database-view #db-flexible-gruppe {
        grid-template-columns: 1fr !important;
    }

    html body #database-view .artikel-db-table-header {
        align-items: stretch !important;
        flex-direction: column !important;
    }

    html body #database-view .artikel-db-table-tools {
        min-width: 0 !important;
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   Step199 - Artikel-Datenbank Detail-Finish: Tabelle, Buttons, Glanz, Lesbarkeit
   Nur diese Datei: styles/17-artikeldatenbank.css
   ========================================================================== */

/* Gesamter Detailbereich näher am Zielbild: ruhiger, edler, weniger harte Linien */
html body #database-view #db-content-area[style*="display:block"],
html body #database-view #db-content-area[style*="display: block"] {
    background:
        radial-gradient(820px 320px at 88% 0%, rgba(64, 142, 232, 0.18), transparent 54%),
        radial-gradient(720px 280px at 18% 5%, rgba(255,255,255,0.07), transparent 52%),
        linear-gradient(135deg, rgba(2, 15, 32, 0.98), rgba(4, 24, 50, 0.98) 48%, rgba(2, 12, 27, 0.98)) !important;
}

html body #database-view .artikel-db-detail-shell {
    background:
        radial-gradient(920px 340px at 96% 2%, rgba(51, 139, 234, 0.19), transparent 52%),
        radial-gradient(620px 240px at 8% 0%, rgba(255,255,255,0.07), transparent 52%),
        linear-gradient(180deg, rgba(255,255,255,0.018), rgba(255,255,255,0) 28%),
        repeating-linear-gradient(126deg, rgba(255,255,255,0.006) 0 2px, rgba(255,255,255,0) 2px 18px) !important;
}

/* Karten bekommen mehr Premium-Glanz wie im Zielbild */
html body #database-view .artikel-db-card {
    border: 1px solid rgba(105, 174, 255, 0.43) !important;
    background:
        radial-gradient(760px 260px at 92% 0%, rgba(70, 151, 236, 0.16), transparent 56%),
        radial-gradient(560px 190px at 8% 0%, rgba(255,255,255,0.065), transparent 54%),
        linear-gradient(135deg, rgba(7, 32, 65, 0.94), rgba(3, 20, 45, 0.98)) !important;
    box-shadow:
        0 18px 42px rgba(0,0,0,0.24),
        inset 0 1px 0 rgba(255,255,255,0.105),
        inset 0 -1px 0 rgba(132, 184, 246, 0.08),
        0 0 0 1px rgba(20, 91, 164, 0.12) !important;
}

html body #database-view .artikel-db-card::before {
    background:
        linear-gradient(115deg, rgba(255,255,255,0.026) 0%, rgba(255,255,255,0.085) 18%, rgba(255,255,255,0.015) 38%, transparent 58%),
        radial-gradient(460px 140px at 72% 0%, rgba(108, 184, 255, 0.10), transparent 62%),
        repeating-linear-gradient(126deg, rgba(255,255,255,0.006) 0 2px, rgba(255,255,255,0) 2px 18px) !important;
}

/* Schrift nicht mehr so klobig, aber weiterhin klar lesbar */
html body #database-view,
html body #database-view input,
html body #database-view select,
html body #database-view button,
html body #database-view table {
    font-family: Inter, "Segoe UI", Arial, sans-serif !important;
}

html body #database-view .artikel-db-section-head h3 {
    font-size: 18px !important;
    font-weight: 720 !important;
    letter-spacing: 0.055em !important;
}

html body #database-view .artikel-db-form label {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: rgba(198, 220, 246, 0.86) !important;
}

html body #database-view .artikel-db-form input,
html body #database-view .artikel-db-form select,
html body #database-view .artikel-db-table-tools input,
html body #database-view .artikel-db-table-tools select {
    font-size: 13px !important;
    font-weight: 520 !important;
    color: rgba(241, 247, 255, 0.94) !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.050), rgba(255,255,255,0.004) 30%),
        rgba(2, 18, 39, 0.66) !important;
}

/* Speichern-Button stärker wie Zielbild */
html body #database-view .artikel-db-save-btn {
    height: 44px !important;
    min-height: 44px !important;
    border-radius: 11px !important;
    border: 1px solid rgba(126, 208, 255, 0.84) !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 760 !important;
    letter-spacing: 0.045em !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.24), rgba(255,255,255,0.055) 20%, transparent 21%),
        radial-gradient(160px 42px at 50% 0%, rgba(118, 204, 255, 0.36), transparent 72%),
        linear-gradient(135deg, #1b8cff 0%, #0062e2 58%, #004fc2 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.28),
        inset 0 -1px 0 rgba(8, 61, 156, 0.60),
        0 0 30px rgba(28, 128, 255, 0.48),
        0 12px 24px rgba(0,0,0,0.22) !important;
}

html body #database-view .artikel-db-save-btn:hover {
    filter: brightness(1.08) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.32),
        inset 0 -1px 0 rgba(8, 61, 156, 0.60),
        0 0 36px rgba(33, 145, 255, 0.58),
        0 14px 28px rgba(0,0,0,0.24) !important;
}

html body #database-view .artikel-db-save-btn .artikel-db-save-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 13px !important;
    opacity: 0.95 !important;
}

/* Gespeicherte Artikel: Header/Filter näher an Zielbild */
html body #database-view .artikel-db-table-header {
    margin-bottom: 12px !important;
}

html body #database-view .artikel-db-table-tools {
    grid-template-columns: minmax(180px, 235px) minmax(320px, 470px) !important;
}

html body #database-view .artikel-db-table-tools input,
html body #database-view .artikel-db-table-tools select {
    border-radius: 8px !important;
    height: 42px !important;
}

/* Tabelle final neu: kein altes Grau, weniger grob, besser lesbar */
html body #database-view .artikel-db-table-wrap {
    border-radius: 12px !important;
    border: 1px solid rgba(94, 157, 232, 0.34) !important;
    background:
        radial-gradient(820px 220px at 88% 0%, rgba(70, 145, 230, 0.08), transparent 54%),
        rgba(3, 17, 38, 0.64) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.06),
        0 16px 32px rgba(0,0,0,0.18) !important;
}

html body #database-view .artikel-db-table-wrap table,
html body #database-view #db-content-area table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    table-layout: fixed !important;
}

html body #database-view .artikel-db-table-wrap thead,
html body #database-view .artikel-db-table-wrap thead tr,
html body #database-view .artikel-db-table-wrap thead th,
html body #database-view #db-content-area table thead,
html body #database-view #db-content-area table thead tr,
html body #database-view #db-content-area table thead th {
    background:
        linear-gradient(180deg, rgba(14, 56, 101, 0.98), rgba(7, 36, 72, 0.98)) !important;
}

html body #database-view .artikel-db-table-wrap th,
html body #database-view #db-content-area table th {
    height: 44px !important;
    padding: 0 14px !important;
    color: rgba(232, 243, 255, 0.94) !important;
    font-size: 11px !important;
    font-weight: 720 !important;
    letter-spacing: 0.060em !important;
    text-transform: uppercase !important;
    border-right: 1px solid rgba(102, 160, 226, 0.18) !important;
    border-bottom: 1px solid rgba(111, 176, 246, 0.32) !important;
}

html body #database-view .artikel-db-table-wrap tbody tr td,
html body #database-view #db-content-area table tbody tr td,
html body #database-view #db-table-body tr td {
    min-height: 56px !important;
    padding: 12px 14px !important;
    color: rgba(226, 238, 252, 0.88) !important;
    font-size: 12px !important;
    line-height: 1.36 !important;
    font-weight: 500 !important;
    vertical-align: middle !important;
    border-right: 1px solid rgba(98, 150, 210, 0.10) !important;
    border-bottom: 1px solid rgba(98, 150, 210, 0.14) !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.018), transparent 38%),
        rgba(5, 24, 52, 0.78) !important;
}

html body #database-view .artikel-db-table-wrap tbody tr:nth-child(even) td,
html body #database-view #db-table-body tr:nth-child(even) td {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.016), transparent 38%),
        rgba(8, 32, 64, 0.82) !important;
}

html body #database-view .artikel-db-table-wrap tbody tr:nth-child(odd) td,
html body #database-view #db-table-body tr:nth-child(odd) td {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.014), transparent 38%),
        rgba(4, 23, 50, 0.80) !important;
}

html body #database-view .artikel-db-table-wrap tbody tr:hover td,
html body #database-view #db-table-body tr:hover td {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.028), transparent 38%),
        rgba(14, 50, 90, 0.88) !important;
}

html body #database-view .artikel-db-table-wrap td:first-child,
html body #database-view #db-table-body td:first-child {
    color: #f3f8ff !important;
    font-weight: 680 !important;
}

html body #database-view .artikel-db-table-wrap td:nth-child(2),
html body #database-view #db-table-body td:nth-child(2) {
    color: rgba(222, 235, 251, 0.86) !important;
}

/* Actions wie im Zielbild: Edit mit Stift, Löschen mit Mülleimer statt X */
html body #database-view #db-table-body td:last-child,
html body #database-view .artikel-db-table-wrap td:last-child {
    white-space: nowrap !important;
}

html body #database-view #db-table-body td:last-child button,
html body #database-view .artikel-db-table-wrap td:last-child button {
    height: 32px !important;
    min-height: 32px !important;
    border-radius: 7px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    vertical-align: middle !important;
}

/* Edit-Button */
html body #database-view #db-table-body td:last-child button:first-child,
html body #database-view .artikel-db-table-wrap td:last-child button:first-child {
    min-width: 72px !important;
    padding: 0 12px !important;
    margin-right: 8px !important;
    border: 1px solid rgba(74, 150, 255, 0.48) !important;
    color: #f2f8ff !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.13), rgba(255,255,255,0.02) 20%, transparent 21%),
        linear-gradient(135deg, rgba(17, 94, 184, 0.98), rgba(6, 53, 122, 0.98)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.14),
        0 8px 16px rgba(0,0,0,0.18),
        0 0 12px rgba(43, 135, 255, 0.12) !important;
}

html body #database-view #db-table-body td:last-child button:first-child::before,
html body #database-view .artikel-db-table-wrap td:last-child button:first-child::before {
    content: "✎" !important;
    display: inline-block !important;
    margin-right: 6px !important;
    color: #c9e6ff !important;
    font-size: 13px !important;
    transform: translateY(-1px) !important;
}

/* Delete-Button: X ausblenden und Mülleimer zeigen */
html body #database-view #db-table-body td:last-child button:last-child,
html body #database-view .artikel-db-table-wrap td:last-child button:last-child {
    min-width: 34px !important;
    width: 34px !important;
    padding: 0 !important;
    font-size: 0 !important;
    margin-left: 0 !important;
    border: 1px solid rgba(255, 91, 106, 0.52) !important;
    color: #ffd7dc !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.13), rgba(255,255,255,0.02) 20%, transparent 21%),
        linear-gradient(135deg, rgba(132, 23, 38, 0.96), rgba(80, 13, 24, 0.98)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.13),
        0 8px 16px rgba(0,0,0,0.18),
        0 0 12px rgba(255, 65, 83, 0.12) !important;
}

html body #database-view #db-table-body td:last-child button:last-child::before,
html body #database-view .artikel-db-table-wrap td:last-child button:last-child::before {
    content: "🗑" !important;
    font-size: 14px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transform: translateY(1px) !important;
}

/* Erste leere/alte Trennzeilen abmildern, falls die alte Renderlogik Spacer-Zeilen setzt */
html body #database-view #db-table-body tr:empty,
html body #database-view .artikel-db-table-wrap tbody tr:empty {
    display: none !important;
}

/* Aktionsspalte sauberer */
html body #database-view .artikel-db-table-wrap th:last-child,
html body #database-view .artikel-db-table-wrap td:last-child,
html body #database-view #db-table-body td:last-child {
    text-align: center !important;
}

/* Footer im Detail mit schönem Abschluss */
html body #database-view #db-content-area .database-modern-footer {
    border-radius: 14px !important;
    border: 1px solid rgba(83, 140, 210, 0.30) !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02) 18%, transparent 19%),
        radial-gradient(820px 160px at 22% 0%, rgba(255,255,255,0.06), transparent 58%),
        linear-gradient(135deg, rgba(10, 42, 79, 0.94), rgba(6, 28, 55, 0.97)) !important;
}

/* Mobile/kleinere Monitore bleiben geschützt */
@media (max-width: 1500px) {
    html body #database-view .artikel-db-table-tools {
        grid-template-columns: minmax(170px, 220px) minmax(260px, 380px) !important;
    }
}

/* ==========================================================================
   Step200 - Artikel-Datenbank: Tabellenkopf hochholen + Kanten abrunden
   Nur diese Datei: styles/17-artikeldatenbank.css
   ========================================================================== */

/* Der Tabellenkopf sitzt jetzt direkt am Tabelleninhalt, ohne leere Zwischenzeile. */
html body #database-view .artikel-db-table-wrap {
    overflow: hidden !important;
    border-radius: 14px !important;
    border: 1px solid rgba(100, 166, 242, 0.38) !important;
}

/* Alte Abstände/Trennflächen zwischen THEAD und TBODY entfernen. */
html body #database-view .artikel-db-table-wrap table,
html body #database-view #db-content-area table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

html body #database-view .artikel-db-table-wrap thead,
html body #database-view #db-content-area table thead {
    display: table-header-group !important;
}

html body #database-view .artikel-db-table-wrap tbody,
html body #database-view #db-content-area table tbody,
html body #database-view #db-table-body {
    display: table-row-group !important;
}

/* Falls die alte Render-/Style-Logik eine leere Spacer-Zeile nach dem Kopf erzeugt, komplett entfernen. */
html body #database-view #db-table-body tr:first-child:empty,
html body #database-view #db-table-body tr:first-child:has(td:empty:only-child),
html body #database-view .artikel-db-table-wrap tbody tr:first-child:empty,
html body #database-view .artikel-db-table-wrap tbody tr:first-child:has(td:empty:only-child) {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
}

/* Header-Zellen oben sauber abrunden. */
html body #database-view .artikel-db-table-wrap thead tr:first-child th:first-child,
html body #database-view #db-content-area table thead tr:first-child th:first-child {
    border-top-left-radius: 12px !important;
}

html body #database-view .artikel-db-table-wrap thead tr:first-child th:last-child,
html body #database-view #db-content-area table thead tr:first-child th:last-child {
    border-top-right-radius: 12px !important;
}

/* Header unten nicht als extra breite Leerfläche wirken lassen. */
html body #database-view .artikel-db-table-wrap th,
html body #database-view #db-content-area table th {
    height: 42px !important;
    min-height: 42px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: 1px solid rgba(111, 176, 246, 0.34) !important;
}

/* Erste Datenzeile direkt unter den Kopf ziehen und sauber anschließen. */
html body #database-view .artikel-db-table-wrap tbody tr:first-child td,
html body #database-view #db-table-body tr:first-child td {
    border-top: 0 !important;
}

/* Falls eine Spacer-Zeile als normale TD-Zeile kommt: unsichtbar machen, wenn sie keine echte Artikelnummer enthält. */
html body #database-view #db-table-body tr:first-child td:empty,
html body #database-view .artikel-db-table-wrap tbody tr:first-child td:empty {
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

/* Untere Ecken der Tabelle ebenfalls sauber abrunden. */
html body #database-view .artikel-db-table-wrap tbody tr:last-child td:first-child,
html body #database-view #db-table-body tr:last-child td:first-child {
    border-bottom-left-radius: 12px !important;
}

html body #database-view .artikel-db-table-wrap tbody tr:last-child td:last-child,
html body #database-view #db-table-body tr:last-child td:last-child {
    border-bottom-right-radius: 12px !important;
}

/* Keine harte rechteckige Innenkante an Kopf oder erster Zeile. */
html body #database-view .artikel-db-table-wrap thead tr,
html body #database-view .artikel-db-table-wrap tbody tr {
    overflow: hidden !important;
}

/* ==========================================================================
   Step201 - Artikel-Datenbank: echte Gruppen-Lücke entfernen + runde Tabellenkanten
   Nur diese Datei: styles/17-artikeldatenbank.css
   ========================================================================== */

/* Die sichtbare Lücke kam von den automatisch erzeugten Gruppen-Trennzeilen.
   Diese Zeilen bleiben technisch im DOM, werden aber komplett unsichtbar und höhenlos. */
html body #database-view #db-table-body tr.db-group-row,
html body #database-view .artikel-db-table-wrap tbody tr.db-group-row,
html body #database-view #db-table-body tr.db-group-row td,
html body #database-view .artikel-db-table-wrap tbody tr.db-group-row td {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    line-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: hidden !important;
}

/* Tabellengehäuse rund und ohne eckige harte Innenkante. */
html body #database-view .artikel-db-table-wrap {
    border-radius: 14px !important;
    overflow: hidden !important;
    background:
        radial-gradient(760px 220px at 88% 0%, rgba(70, 145, 230, 0.08), transparent 54%),
        rgba(3, 17, 38, 0.64) !important;
    border: 1px solid rgba(100, 166, 242, 0.38) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.06),
        0 16px 32px rgba(0,0,0,0.18) !important;
}

/* Tabelle selbst darf keine eigenen eckigen Außenkanten zeichnen. */
html body #database-view .artikel-db-table-wrap table,
html body #database-view #db-content-area table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    background: transparent !important;
}

/* Kopf direkt oben, sauber gerundet. */
html body #database-view .artikel-db-table-wrap thead tr:first-child th:first-child,
html body #database-view #db-content-area table thead tr:first-child th:first-child {
    border-top-left-radius: 13px !important;
}

html body #database-view .artikel-db-table-wrap thead tr:first-child th:last-child,
html body #database-view #db-content-area table thead tr:first-child th:last-child {
    border-top-right-radius: 13px !important;
}

html body #database-view .artikel-db-table-wrap th,
html body #database-view #db-content-area table th {
    height: 42px !important;
    min-height: 42px !important;
    background:
        linear-gradient(180deg, rgba(14, 56, 101, 0.98), rgba(7, 36, 72, 0.98)) !important;
}

/* Erste echte Artikelzeile kommt direkt nach dem Tabellenkopf. */
html body #database-view #db-table-body tr:not(.db-group-row):first-of-type td,
html body #database-view .artikel-db-table-wrap tbody tr:not(.db-group-row):first-of-type td {
    border-top: 0 !important;
}

/* Untere Kanten sauber abrunden. */
html body #database-view .artikel-db-table-wrap tbody tr:last-child td:first-child,
html body #database-view #db-table-body tr:last-child td:first-child {
    border-bottom-left-radius: 13px !important;
}

html body #database-view .artikel-db-table-wrap tbody tr:last-child td:last-child,
html body #database-view #db-table-body tr:last-child td:last-child {
    border-bottom-right-radius: 13px !important;
}

/* Keine eckigen Zellhintergründe über die Rundung hinaus. */
html body #database-view .artikel-db-table-wrap th,
html body #database-view .artikel-db-table-wrap td,
html body #database-view #db-table-body td {
    background-clip: padding-box !important;
}

/* Die erste Datenzeile soll nicht durch eine alte blaue Trenner-Zeile nach unten gedrückt werden. */
html body #database-view #db-table-body {
    border-top: 0 !important;
}

/* ==========================================================================
   Step202 - Artikel-Datenbank: dunklen Abstand über Tabellenkopf entfernen
   Nur diese Datei: styles/17-artikeldatenbank.css
   ========================================================================== */

/* Der dunkle Streifen kam vom Innenabstand/Alt-Margin im Tabellengehäuse.
   Das Tabellengehäuse hat jetzt keinerlei Innenabstand mehr. */
html body #database-view .artikel-db-table-wrap {
    padding: 0 !important;
    margin-top: 0 !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    line-height: normal !important;
}

/* Die Tabelle sitzt bündig ganz oben im Tabellengehäuse. */
html body #database-view .artikel-db-table-wrap table,
html body #database-view #db-content-area table {
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    position: relative !important;
    top: 0 !important;
    border-radius: 14px !important;
    overflow: hidden !important;
}

/* Thead/Tbody dürfen keinen eigenen Abstand erzeugen. */
html body #database-view .artikel-db-table-wrap thead,
html body #database-view .artikel-db-table-wrap tbody,
html body #database-view #db-content-area table thead,
html body #database-view #db-content-area table tbody,
html body #database-view #db-table-body {
    margin: 0 !important;
    padding: 0 !important;
    border-spacing: 0 !important;
}

/* Tabellenkopf direkt an die obere Kante. */
html body #database-view .artikel-db-table-wrap thead tr,
html body #database-view #db-content-area table thead tr {
    margin: 0 !important;
    padding: 0 !important;
    height: 42px !important;
    border-radius: 14px 14px 0 0 !important;
}

/* Header-Zellen übernehmen die Rundung, damit keine eckigen Kanten entstehen. */
html body #database-view .artikel-db-table-wrap thead tr:first-child th,
html body #database-view #db-content-area table thead tr:first-child th {
    border-top: 0 !important;
}

html body #database-view .artikel-db-table-wrap thead tr:first-child th:first-child,
html body #database-view #db-content-area table thead tr:first-child th:first-child {
    border-top-left-radius: 13px !important;
}

html body #database-view .artikel-db-table-wrap thead tr:first-child th:last-child,
html body #database-view #db-content-area table thead tr:first-child th:last-child {
    border-top-right-radius: 13px !important;
}

/* Keine alten unsichtbaren Spacer über oder unter dem Tabellenkopf. */
html body #database-view .artikel-db-table-wrap thead::before,
html body #database-view .artikel-db-table-wrap thead::after,
html body #database-view .artikel-db-table-wrap tbody::before,
html body #database-view .artikel-db-table-wrap tbody::after,
html body #database-view #db-table-body::before,
html body #database-view #db-table-body::after {
    content: none !important;
    display: none !important;
}

/* Der Bereich zwischen Tabellenkopf und erster Artikelzeile bleibt ebenfalls ohne Extra-Abstand. */
html body #database-view .artikel-db-table-wrap thead + tbody,
html body #database-view #db-content-area table thead + tbody {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

html body #database-view .artikel-db-table-wrap tbody tr:not(.db-group-row):first-child td,
html body #database-view #db-table-body tr:not(.db-group-row):first-child td {
    border-top: 0 !important;
}

/* ==========================================================================
   Step203 - Artikel-Datenbank: F5-Detail bleibt offen + Footer bündig
   Nur CSS-Teil: Footer in Übersicht und Detail auf Fenster-Innenbreite begrenzen
   ========================================================================== */

/* Übersicht: Fußzeile endet nicht mehr ganz rechts am Außenfenster,
   sondern bleibt wie eine Admin-Footer-Kachel sauber innen eingerückt. */
html body #database-view #db-bereich-dashboard > .database-modern-footer {
    width: calc(100% - 32px) !important;
    max-width: calc(100% - 32px) !important;
    align-self: center !important;
    margin: auto 16px 12px !important;
    box-sizing: border-box !important;
}

/* Detail/Eingabe-Seite: Fußzeile ebenfalls sauber innen eingerückt,
   passend zum rechten Rand des Inhaltsfensters. */
html body #database-view #db-content-area .artikel-db-detail-shell > .database-modern-footer,
html body #database-view #db-content-area .database-modern-footer.database-modern-footer-content {
    width: calc(100% - 32px) !important;
    max-width: calc(100% - 32px) !important;
    align-self: center !important;
    margin: auto 16px 0 !important;
    box-sizing: border-box !important;
}

/* Der Footer bleibt edel, aber nicht über die Inhaltskante hinausgezogen. */
html body #database-view .database-modern-footer {
    min-height: 54px !important;
    height: 54px !important;
    border-radius: 14px !important;
    overflow: hidden !important;
}

/* ==========================================================================
   Step590 - Artikel-Datenbank: manuelle Rüstmatrix-Stammdaten
   - Kundenfelder und Kundenanzeige entfernt
   - Anlagenparameter werden je Anlage gepflegt
   - mehrere Werkzeug-/Variantenkombinationen je Anlage
   - bestehende Regeln dieses Bereichs direkt konsolidiert
   ========================================================================== */

html body #database-view .artikel-db-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 18px !important;
}

html body #database-view .artikel-db-form-row {
    gap: 16px !important;
    align-items: end !important;
}

html body #database-view #db-feste-gruppe[style*="display:none"],
html body #database-view #db-feste-gruppe[style*="display: none"],
html body #database-view #db-flexible-gruppe[style*="display:none"],
html body #database-view #db-flexible-gruppe[style*="display: none"] {
    display: none !important;
}

html body #database-view .artikel-db-form-row-top {
    display: grid !important;
    grid-template-columns: 0.78fr 1.12fr 1.15fr 1.18fr 0.82fr !important;
}

html body #database-view #db-feste-gruppe:not([style*="display:none"]):not([style*="display: none"]),
html body #database-view #db-feste-gruppe[style*="display:grid"],
html body #database-view #db-feste-gruppe[style*="display: grid"] {
    display: grid !important;
    grid-template-columns: 1fr 1.55fr 1fr 1fr 0.78fr !important;
}

html body #database-view #db-flexible-gruppe[style*="display:grid"],
html body #database-view #db-flexible-gruppe[style*="display: grid"] {
    display: grid !important;
    grid-template-columns: 1fr 1.45fr 1.75fr 0.78fr !important;
}

html body #database-view .artikel-db-form .admin-form-group {
    min-width: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 7px !important;
}

html body #database-view .artikel-db-form label {
    color: rgba(185, 212, 244, 0.88) !important;
    font-size: 11px !important;
    line-height: 1.08 !important;
    font-weight: 780 !important;
    letter-spacing: 0.045em !important;
    text-transform: uppercase !important;
}

html body #database-view .artikel-db-form input,
html body #database-view .artikel-db-form select,
html body #database-view .artikel-db-table-tools input,
html body #database-view .artikel-db-table-tools select {
    width: 100% !important;
    height: 40px !important;
    min-height: 40px !important;
    box-sizing: border-box !important;
    border-radius: 8px !important;
    border: 1px solid rgba(99, 153, 218, 0.36) !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0) 28%),
        rgba(2, 18, 39, 0.68) !important;
    color: #eef7ff !important;
    font-size: 13px !important;
    font-weight: 540 !important;
    padding: 0 12px !important;
    outline: none !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 8px 14px rgba(0,0,0,0.08) !important;
}

html body #database-view .artikel-db-form input::placeholder,
html body #database-view .artikel-db-table-tools input::placeholder {
    color: rgba(208, 224, 244, 0.48) !important;
}

html body #database-view .artikel-db-form input:focus,
html body #database-view .artikel-db-form select:focus,
html body #database-view .artikel-db-table-tools input:focus,
html body #database-view .artikel-db-table-tools select:focus {
    border-color: rgba(76, 159, 255, 0.76) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 0 0 3px rgba(43, 134, 249, 0.13) !important;
}

html body #database-view #db-komponenten-inputs-list {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 7px !important;
    min-height: 40px !important;
}

html body #database-view .db-komponente-row {
    display: grid !important;
    grid-template-columns: minmax(120px, 1fr) 36px !important;
    gap: 7px !important;
    align-items: center !important;
}

html body #database-view .copy-btn {
    width: 26px !important;
    min-width: 26px !important;
    height: 24px !important;
    min-height: 24px !important;
    margin-left: 6px !important;
    padding: 0 !important;
    border-radius: 7px !important;
    border: 1px solid rgba(126, 183, 241, 0.62) !important;
    background: linear-gradient(135deg, rgba(30, 95, 158, 0.96), rgba(12, 58, 108, 0.96)) !important;
    color: #ffffff !important;
    font-weight: 900 !important;
    cursor: pointer !important;
}

html body #database-view .db-anlagenparameter-section {
    width: 100% !important;
    padding: 16px !important;
    box-sizing: border-box !important;
    border-radius: 14px !important;
    border: 1px solid rgba(85, 151, 226, 0.30) !important;
    background:
        radial-gradient(520px 150px at 10% 0%, rgba(56, 135, 224, 0.12), transparent 62%),
        rgba(3, 20, 43, 0.56) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05) !important;
}

html body #database-view .db-anlagenparameter-head,
html body #database-view .db-param-werkzeuge-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
}

html body #database-view .db-anlagenparameter-head {
    margin-bottom: 12px !important;
}

html body #database-view .db-anlagenparameter-head h4,
html body #database-view .db-param-werkzeuge-head span {
    margin: 0 !important;
    color: #e7f3ff !important;
    font-size: 12px !important;
    font-weight: 850 !important;
    letter-spacing: 0.055em !important;
}

html body #database-view .db-anlagenparameter-add-btn,
html body #database-view .db-param-werkzeug-add {
    min-height: 34px !important;
    padding: 0 14px !important;
    border-radius: 9px !important;
    border: 1px solid rgba(100, 178, 255, 0.58) !important;
    background: linear-gradient(135deg, rgba(24, 121, 226, 0.96), rgba(7, 70, 155, 0.98)) !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 850 !important;
    letter-spacing: 0.035em !important;
    cursor: pointer !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 7px 15px rgba(0,0,0,0.18) !important;
}

html body #database-view .db-anlagenparameter-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

html body #database-view .db-anlagenparameter-card {
    padding: 14px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(93, 155, 225, 0.24) !important;
    background: rgba(5, 27, 57, 0.72) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 8px 20px rgba(0,0,0,0.12) !important;
}

html body #database-view .db-anlagenparameter-grid {
    display: grid !important;
    grid-template-columns: 1.12fr repeat(7, minmax(92px, 0.72fr)) 40px !important;
    gap: 10px !important;
    align-items: end !important;
}

html body #database-view .db-anlagenparameter-remove-btn,
html body #database-view .db-param-row-remove {
    width: 38px !important;
    min-width: 38px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    border-radius: 9px !important;
    border: 1px solid rgba(255, 126, 140, 0.56) !important;
    background: linear-gradient(135deg, rgba(176, 31, 47, 0.96), rgba(103, 15, 29, 0.98)) !important;
    color: #ffffff !important;
    font-size: 20px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 7px 14px rgba(0,0,0,0.20) !important;
}

html body #database-view .db-param-werkzeuge {
    margin-top: 12px !important;
    padding-top: 12px !important;
    border-top: 1px solid rgba(100, 158, 224, 0.18) !important;
}

html body #database-view .db-param-werkzeuge-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin-top: 9px !important;
}

html body #database-view .db-param-werkzeug-row {
    display: grid !important;
    grid-template-columns: minmax(180px, 1fr) minmax(130px, 0.55fr) 38px !important;
    gap: 9px !important;
    align-items: center !important;
    max-width: 720px !important;
}

html body #database-view .artikel-db-form-actions {
    display: flex !important;
    justify-content: flex-end !important;
}

html body #database-view .artikel-db-save-btn {
    width: min(100%, 280px) !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 18px !important;
    border-radius: 10px !important;
    border: 1px solid rgba(113, 200, 255, 0.78) !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 820 !important;
    letter-spacing: 0.035em !important;
    text-transform: uppercase !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.20), rgba(255,255,255,0.04) 20%, transparent 21%),
        linear-gradient(135deg, #1d8cff 0%, #005bd9 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 0 28px rgba(20, 122, 255, 0.38), 0 12px 24px rgba(0,0,0,0.20) !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 9px !important;
}

html body #database-view .artikel-db-table-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 18px !important;
    margin-bottom: 14px !important;
}

html body #database-view .artikel-db-table-header .artikel-db-section-head {
    margin-bottom: 0 !important;
}

html body #database-view .artikel-db-table-tools {
    display: grid !important;
    grid-template-columns: minmax(180px, 240px) minmax(260px, 450px) 42px !important;
    gap: 12px !important;
    align-items: center !important;
    min-width: min(100%, 710px) !important;
}

html body #database-view .artikel-db-table-wrap {
    width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    border-radius: 12px !important;
    border: 1px solid rgba(92, 148, 213, 0.28) !important;
    background: rgba(3, 17, 38, 0.54) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05) !important;
}

html body #database-view .artikel-db-table-wrap table.artikel-db-main-table {
    width: 100% !important;
    min-width: 1380px !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    color: #edf6ff !important;
    background: transparent !important;
    table-layout: fixed !important;
}

html body #database-view .artikel-db-main-table .artikel-db-col-artikelnummer { width: 10.5% !important; }
html body #database-view .artikel-db-main-table .artikel-db-col-bezeichnung { width: 14% !important; }
html body #database-view .artikel-db-main-table .artikel-db-col-profitcenter { width: 8% !important; }
html body #database-view .artikel-db-main-table .artikel-db-col-anlage { width: 9% !important; }
html body #database-view .artikel-db-main-table .artikel-db-col-werkzeug { width: 16% !important; }
html body #database-view .artikel-db-main-table .artikel-db-col-komponenten { width: 11% !important; }
html body #database-view .artikel-db-main-table .artikel-db-col-stueck { width: 8% !important; }
html body #database-view .artikel-db-main-table .artikel-db-col-losgroesse { width: 7.5% !important; }
html body #database-view .artikel-db-main-table .artikel-db-col-personal { width: 7.5% !important; }
html body #database-view .artikel-db-main-table .artikel-db-col-aktion { width: 8.5% !important; }

html body #database-view .artikel-db-table-wrap thead,
html body #database-view .artikel-db-table-wrap thead tr,
html body #database-view .artikel-db-table-wrap thead th {
    background: linear-gradient(180deg, rgba(21, 66, 112, 0.96), rgba(10, 43, 82, 0.96)) !important;
    color: rgba(224, 239, 255, 0.96) !important;
}

html body #database-view .artikel-db-table-wrap th {
    height: 52px !important;
    padding: 0 11px !important;
    text-align: left !important;
    color: rgba(224, 239, 255, 0.96) !important;
    font-size: 11px !important;
    font-weight: 790 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    border-right: 1px solid rgba(98, 150, 210, 0.18) !important;
    border-bottom: 1px solid rgba(103, 162, 229, 0.30) !important;
    white-space: normal !important;
    line-height: 1.15 !important;
    overflow: hidden !important;
}

html body #database-view .artikel-db-th-line {
    display: block !important;
    white-space: nowrap !important;
}

html body #database-view .artikel-db-table-wrap tbody tr td,
html body #database-view #db-table-body tr td {
    min-height: 54px !important;
    padding: 12px 11px !important;
    color: rgba(231, 241, 255, 0.92) !important;
    font-size: 12px !important;
    line-height: 1.38 !important;
    font-weight: 520 !important;
    vertical-align: middle !important;
    border-right: 1px solid rgba(98, 150, 210, 0.13) !important;
    border-bottom: 1px solid rgba(98, 150, 210, 0.15) !important;
    background: rgba(3, 22, 47, 0.74) !important;
    overflow-wrap: anywhere !important;
}

html body #database-view .artikel-db-table-wrap tbody tr:nth-child(even) td,
html body #database-view #db-table-body tr:nth-child(even) td {
    background: rgba(10, 35, 68, 0.78) !important;
}

html body #database-view .artikel-db-table-wrap tbody tr:hover td,
html body #database-view #db-table-body tr:hover td {
    background: rgba(16, 55, 96, 0.86) !important;
}

html body #database-view .artikel-db-table-wrap .db-group-row td,
html body #database-view #db-table-body .db-group-row td {
    height: 7px !important;
    min-height: 7px !important;
    padding: 0 !important;
    border: 0 !important;
    background: rgba(1, 11, 25, 0.72) !important;
}

html body #database-view .artikel-db-table-wrap th:last-child,
html body #database-view .artikel-db-table-wrap td:last-child {
    text-align: center !important;
    border-right: 0 !important;
    white-space: nowrap !important;
    overflow: visible !important;
}

html body #database-view #db-table-body td:last-child button {
    min-width: 58px !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 10px !important;
    border-radius: 8px !important;
    font-size: 11px !important;
    font-weight: 790 !important;
    border: 1px solid rgba(95, 169, 255, 0.45) !important;
    background: linear-gradient(135deg, rgba(16, 93, 178, 0.96), rgba(6, 55, 122, 0.98)) !important;
    color: #f4fbff !important;
    cursor: pointer !important;
}

html body #database-view #db-table-body td:last-child button:last-child {
    min-width: 30px !important;
    width: 30px !important;
    padding: 0 !important;
    margin-left: 6px !important;
    border-color: rgba(255, 93, 105, 0.48) !important;
    background: linear-gradient(135deg, rgba(135, 24, 38, 0.94), rgba(83, 14, 25, 0.98)) !important;
    color: #ffd7dc !important;
}

@media (max-width: 1600px) {
    html body #database-view .artikel-db-form-row-top,
    html body #database-view #db-feste-gruppe:not([style*="display:none"]):not([style*="display: none"]),
    html body #database-view #db-feste-gruppe[style*="display:grid"],
    html body #database-view #db-flexible-gruppe[style*="display:grid"] {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    html body #database-view .db-anlagenparameter-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) 40px !important;
    }

    html body #database-view .db-anlagenparameter-remove-btn {
        grid-column: 5 !important;
        grid-row: 1 !important;
    }
}

@media (max-width: 1100px) {
    html body #database-view .artikel-db-form-row-top,
    html body #database-view #db-feste-gruppe,
    html body #database-view #db-flexible-gruppe,
    html body #database-view .db-anlagenparameter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    html body #database-view .db-anlagenparameter-remove-btn {
        grid-column: auto !important;
        grid-row: auto !important;
    }

    html body #database-view .artikel-db-table-header {
        align-items: stretch !important;
        flex-direction: column !important;
    }

    html body #database-view .artikel-db-table-tools {
        min-width: 0 !important;
        grid-template-columns: 1fr 1fr 42px !important;
    }
}

@media (max-width: 760px) {
    html body #database-view .artikel-db-form-row-top,
    html body #database-view #db-feste-gruppe,
    html body #database-view #db-flexible-gruppe,
    html body #database-view .db-anlagenparameter-grid,
    html body #database-view .db-param-werkzeug-row,
    html body #database-view .artikel-db-table-tools {
        grid-template-columns: 1fr !important;
    }

    html body #database-view .db-anlagenparameter-remove-btn,
    html body #database-view .db-param-row-remove {
        width: 100% !important;
    }

    html body #database-view .artikel-db-form-actions {
        justify-content: stretch !important;
    }

    html body #database-view .artikel-db-save-btn {
        width: 100% !important;
    }
}


/* ==========================================================================
   Step 591: D9-Rüstmatrix-Import mit kontrollierter Vorschau
   ========================================================================== */

html body #database-view .artikel-db-ruestmatrix-card {
    display: flex;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 24px !important;
    padding: 17px 20px !important;
    border-color: rgba(77, 166, 255, 0.45) !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.065), rgba(255,255,255,0.012) 22%, transparent 23%),
        linear-gradient(135deg, rgba(10, 48, 91, 0.97), rgba(5, 31, 64, 0.98)) !important;
}

html body #database-view .artikel-db-ruestmatrix-copy {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

html body #database-view .artikel-db-ruestmatrix-copy .artikel-db-section-head {
    margin: 0 !important;
}

html body .db-ruestmatrix-pilot-badge {
    display: inline-flex;
    align-items: center;
    min-height: 29px;
    padding: 0 11px;
    border: 1px solid rgba(75, 177, 255, 0.45);
    border-radius: 999px;
    background: rgba(20, 111, 198, 0.17);
    color: #bfe6ff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.045em;
    white-space: nowrap;
}

html body #database-view .artikel-db-ruestmatrix-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

html body .db-ruestmatrix-import-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 260px;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid rgba(113, 200, 255, 0.78);
    border-radius: 10px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.20), rgba(255,255,255,0.04) 20%, transparent 21%),
        linear-gradient(135deg, #1d8cff 0%, #005bd9 100%);
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 0 24px rgba(20, 122, 255, 0.28), 0 10px 22px rgba(0,0,0,0.20);
    font-size: 13px;
    font-weight: 820;
    letter-spacing: 0.035em;
    cursor: pointer;
}

html body .db-ruestmatrix-import-btn:hover {
    filter: brightness(1.08);
}

html body.db-ruestmatrix-modal-open {
    overflow: hidden;
}

html body .db-ruestmatrix-modal {
    position: fixed;
    inset: 0;
    z-index: 10080;
    box-sizing: border-box;
    display: none;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    padding: 26px;
    overflow: hidden;
    isolation: isolate;
    background: rgba(1, 9, 22, 0.78);
    backdrop-filter: blur(8px);
}

html body .db-ruestmatrix-modal.is-visible {
    display: flex;
}

html body .db-ruestmatrix-modal-panel {
    box-sizing: border-box;
    width: min(980px, calc(100vw - 52px));
    max-height: min(860px, calc(100vh - 52px));
    margin: 0;
    overflow: auto;
    border: 1px solid rgba(94, 168, 247, 0.56);
    border-radius: 18px;
    background:
        radial-gradient(700px 280px at 10% 0%, rgba(47, 132, 224, 0.15), transparent 55%),
        linear-gradient(145deg, rgba(9, 39, 78, 0.995), rgba(4, 22, 48, 0.995));
    box-shadow: 0 32px 80px rgba(0,0,0,0.52), inset 0 1px 0 rgba(255,255,255,0.09);
    color: #edf7ff;
}

html body .db-ruestmatrix-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 22px;
    border-bottom: 1px solid rgba(101, 160, 224, 0.23);
}

html body .db-ruestmatrix-modal-kicker {
    display: block;
    margin-bottom: 4px;
    color: #74bdff;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.14em;
}

html body .db-ruestmatrix-modal-head h3 {
    margin: 0;
    color: #f7fbff;
    font-size: 22px;
    font-weight: 820;
}

html body .db-ruestmatrix-modal-close {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 1px solid rgba(136, 185, 236, 0.34);
    border-radius: 10px;
    background: rgba(4, 25, 53, 0.78);
    color: #dbeeff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

html body .db-ruestmatrix-modal-close:disabled {
    opacity: 0.35;
    cursor: default;
}

html body .db-ruestmatrix-loading {
    min-height: 330px;
    padding: 44px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

html body .db-ruestmatrix-spinner {
    width: 52px;
    height: 52px;
    margin-bottom: 20px;
    border: 4px solid rgba(121, 185, 246, 0.18);
    border-top-color: #3aa7ff;
    border-radius: 50%;
    animation: db-ruestmatrix-spin 0.85s linear infinite;
}

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

html body .db-ruestmatrix-loading strong {
    color: #f5fbff;
    font-size: 18px;
    font-weight: 800;
}

html body .db-ruestmatrix-loading span {
    max-width: 640px;
    margin-top: 8px;
    color: rgba(207, 226, 247, 0.72);
    font-size: 13px;
    overflow-wrap: anywhere;
}

html body .db-ruestmatrix-preview {
    padding: 20px 22px 22px;
}

html body .db-ruestmatrix-file-row {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin-bottom: 17px;
    padding: 12px 14px;
    border: 1px solid rgba(99, 159, 221, 0.24);
    border-radius: 11px;
    background: rgba(3, 22, 47, 0.58);
}

html body .db-ruestmatrix-file-row span {
    color: rgba(188, 214, 241, 0.66);
    font-size: 11px;
    font-weight: 780;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

html body .db-ruestmatrix-file-row strong {
    color: #eaf5ff;
    font-size: 13px;
    overflow-wrap: anywhere;
}

html body .db-ruestmatrix-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

html body .db-ruestmatrix-summary-card {
    min-height: 86px;
    padding: 14px;
    border: 1px solid rgba(97, 157, 220, 0.24);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(9, 42, 82, 0.82), rgba(4, 25, 53, 0.88));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.045);
}

html body .db-ruestmatrix-summary-card span {
    display: block;
    min-height: 29px;
    color: rgba(195, 219, 244, 0.70);
    font-size: 10px;
    font-weight: 780;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

html body .db-ruestmatrix-summary-card strong {
    display: block;
    color: #f5fbff;
    font-size: 24px;
    font-weight: 850;
}

html body .db-ruestmatrix-summary-new {
    border-color: rgba(78, 211, 144, 0.34);
}

html body .db-ruestmatrix-summary-new strong {
    color: #74efad;
}

html body .db-ruestmatrix-summary-update {
    border-color: rgba(69, 166, 255, 0.40);
}

html body .db-ruestmatrix-summary-update strong {
    color: #72bdff;
}

html body .db-ruestmatrix-summary-warning {
    border-color: rgba(255, 187, 75, 0.38);
}

html body .db-ruestmatrix-summary-warning strong {
    color: #ffd172;
}

html body .db-ruestmatrix-warning-section {
    margin-top: 16px;
    border: 1px solid rgba(255, 186, 75, 0.34);
    border-radius: 12px;
    background: rgba(91, 57, 8, 0.18);
    overflow: hidden;
}

html body .db-ruestmatrix-warning-head {
    padding: 13px 15px;
    border-bottom: 1px solid rgba(255, 186, 75, 0.20);
}

html body .db-ruestmatrix-warning-head strong,
html body .db-ruestmatrix-warning-head span {
    display: block;
}

html body .db-ruestmatrix-warning-head strong {
    color: #ffe0a0;
    font-size: 13px;
}

html body .db-ruestmatrix-warning-head span {
    margin-top: 3px;
    color: rgba(255, 225, 169, 0.72);
    font-size: 11px;
}

html body .db-ruestmatrix-warning-list {
    max-height: 210px;
    overflow: auto;
}

html body .db-ruestmatrix-warning-item {
    display: grid;
    grid-template-columns: minmax(180px, 0.35fr) minmax(0, 1fr);
    gap: 14px;
    padding: 11px 15px;
    border-bottom: 1px solid rgba(255, 204, 112, 0.12);
}

html body .db-ruestmatrix-warning-item:last-child {
    border-bottom: 0;
}

html body .db-ruestmatrix-warning-item strong {
    color: #ffdfa0;
    font-size: 11px;
}

html body .db-ruestmatrix-warning-item span {
    color: rgba(244, 228, 198, 0.82);
    font-size: 11px;
    line-height: 1.42;
}

html body .db-ruestmatrix-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

html body .db-ruestmatrix-cancel-btn,
html body .db-ruestmatrix-commit-btn {
    min-height: 42px;
    padding: 0 18px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 820;
    letter-spacing: 0.035em;
    cursor: pointer;
}

html body .db-ruestmatrix-cancel-btn {
    border: 1px solid rgba(127, 166, 207, 0.36);
    background: rgba(7, 35, 70, 0.80);
    color: #d8eaff;
}

html body .db-ruestmatrix-commit-btn {
    min-width: 250px;
    border: 1px solid rgba(113, 200, 255, 0.78);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.035) 20%, transparent 21%),
        linear-gradient(135deg, #1d8cff 0%, #005bd9 100%);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(0, 91, 217, 0.25);
}

@media (max-width: 900px) {
    html body #database-view .artikel-db-ruestmatrix-card,
    html body #database-view .artikel-db-ruestmatrix-copy {
        align-items: stretch;
        flex-direction: column;
    }

    html body #database-view .artikel-db-ruestmatrix-copy {
        gap: 10px;
    }

    html body #database-view .artikel-db-ruestmatrix-actions,
    html body .db-ruestmatrix-import-btn {
        width: 100%;
    }

    html body .db-ruestmatrix-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    html body .db-ruestmatrix-modal {
        padding: 10px;
    }

    html body .db-ruestmatrix-modal-panel {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
    }

    html body .db-ruestmatrix-summary-grid,
    html body .db-ruestmatrix-warning-item {
        grid-template-columns: 1fr;
    }

    html body .db-ruestmatrix-modal-actions {
        flex-direction: column-reverse;
    }

    html body .db-ruestmatrix-cancel-btn,
    html body .db-ruestmatrix-commit-btn {
        width: 100%;
    }
}
