@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800&display=swap');

/* Hamma WebApp CI - Globale Stylesheet */
:root {
    /* Hamma Corporate Colors */
    --primary: #eb5e00;
    --primary-hover: #c44d00;
    --primary-glow: rgba(234, 88, 12, 0.15);
    --bg-color: #f8fafc;
    --panel-bg: #ffffff;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --safe: #10b981;
    --safe-bg: #ecfdf5;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Outfit', Tahoma, 'Segoe UI', Arial, sans-serif;
}

html {
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-color);
    color: var(--text-dark);
    min-height: 100vh;
    font-size: 16px;
    line-height: 1.5;
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}

/* --- Typografie --- */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-dark);
    font-weight: 700;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

p {
    color: var(--text-muted);
}

/* --- Container & Layout --- */
.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

.card, .glass-panel, .calculator-panel {
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.glass-panel {
    padding: 2.5rem;
}

.flex-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.form-row { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 1.5rem; 
    margin-bottom: 1.2rem; 
}
@media (max-width: 768px) {
    .form-row, 
    .form-row[style*="grid-template-columns"] { 
        grid-template-columns: 1fr !important;
    }
    /* Alle grid-column: span X auf Mobile zurücksetzen */
    .form-row > [style*="grid-column"],
    .form-row > div[style*="span"] {
        grid-column: 1 / -1 !important;
    }
    .input-group.full {
        grid-column: 1 / -1 !important;
    }
    /* Tool-Links auf Mobile vollbreite und Wrap */
    .tool-link {
        width: 100%;
        box-sizing: border-box;
        flex-wrap: wrap;
    }
}

/* --- Navigation / Header --- */
.top-navbar, .dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--panel-bg);
    border-bottom: 4px solid var(--primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    color: var(--text-dark);
}

/* Neuer CI-konformer universaler Header-Standard (Logo IMMER oben rechts) */
.ci-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--panel-bg);
    border-bottom: 4px solid var(--primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.ci-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-grow: 1;
}

.ci-header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-right: 20px;
}

.ci-header-right {
    min-width: 100px;
    display: flex;
    justify-content: flex-end;
}

.hamma-ci-logo {
    height: 45px;
    max-height: 8vh;
    max-width: 150px;
    width: auto;
    display: block;
    object-fit: contain;
}

/* --- Dual-Logo Header (BUG-28 / Feature 3) --- */
.ci-header-right {
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

/* Kundenlogo links */
#ui_logo_customer {
    max-height: 40px;
    max-width: 140px;
    width: auto;
    object-fit: contain;
    display: none; /* wird per JS eingeblendet wenn vorhanden */
    cursor: default;
    border-radius: 4px;
}

/* Support-Logo rechts */
#ui_logo_support {
    max-height: 40px;
    max-width: 140px;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
    transition: opacity 0.2s;
}
#support_logo_link:hover #ui_logo_support {
    opacity: 0.8;
}

@media (max-width: 800px) {
    .ci-header {
        padding: 0.8rem 1rem;
        flex-wrap: wrap;
    }
    
    .ci-header-left {
        width: calc(100% - 110px);
        flex-grow: 0;
        order: 1;
    }
    
    .ci-header-right {
        width: 100px;
        min-width: unset;
        order: 2;
        justify-content: flex-end;
    }
    
    .ci-header-controls {
        width: 100%;
        order: 3;
        margin-top: 12px;
        margin-right: 0;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .hamma-ci-logo {
        height: 35px;
        max-width: 110px;
    }

    /* Dual-Logo mobil */
    #ui_logo_customer, #ui_logo_support {
        max-height: 28px;
        max-width: 90px;
    }
    
    .ci-header-left h1 {
        font-size: 1.2rem !important;
    }
}

/* --- Formularelemente --- */
.input-group { 
    display: flex; 
    flex-direction: column; 
    gap: 0.5rem; 
}
.input-group.full { grid-column: span 2; }

label { 
    font-size: 0.85rem; 
    font-weight: 700; 
    color: #475569; 
    letter-spacing: 0.3px;
}

input, select, textarea {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.85rem 1.2rem;
    color: #0f172a;
    font-size: 1rem;
    width: 100%; 
    box-sizing: border-box; 
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

select option {
    background: #ffffff;
    color: #0f172a;
}


input:focus, select:focus, textarea:focus { 
    border-color: var(--primary); 
    box-shadow: 0 0 0 4px var(--primary-glow), inset 0 1px 2px rgba(0,0,0,0.02);
    background: #ffffff;
    transform: translateY(-1px);
}

/* Global focus styles for keyboard/scanner navigation accessibility */
input[type="checkbox"]:focus,
input[type="radio"]:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

button:focus,
.btn:focus,
.btn-submit:focus,
.tab-btn:focus,
a:focus {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

input[readonly], input:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
    border-style: dashed;
}

/* Alerts & States */
.danger-state { 
    border-color: var(--danger) !important; 
    background: #fef2f2 !important; 
    color: #991b1b !important;
    box-shadow: inset 0 0 0 1px var(--danger);
}
label.danger-label { color: var(--danger); font-weight: 800; }

/* --- Buttons --- */
.btn, .btn-submit {
    padding: 0.85rem 1.75rem;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    letter-spacing: 0.5px;
}
.btn:hover, .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}
.btn:active, .btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px -1px rgba(0,0,0,0.1);
}

.btn-primary, .btn-submit { 
    background: var(--primary);
    color: #ffffff; 
    box-shadow: 0 2px 4px rgba(234, 88, 12, 0.3);
}
.btn-primary:hover, .btn-submit:hover { 
    background: var(--primary-hover); 
}

.btn-safe { background: var(--safe); color: white; }
.btn-safe:hover { background: #059669; }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }

.btn-submit { width: 100%; font-size: 1.1rem; }

/* --- Tabellen --- */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

table { width: 100%; border-collapse: collapse; text-align: left; }
th { 
    color: var(--text-muted); 
    padding: 12px 10px; 
    border-bottom: 2px solid var(--border); 
    font-size: 0.85rem; 
    text-transform: uppercase; 
    white-space: nowrap;
}
td { 
    padding: 12px 10px; 
    border-bottom: 1px solid var(--border); 
    color: var(--text-dark);
    white-space: nowrap;
}

/* --- Listen / Links --- */
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Tool Links (customer.html specifics abstracted) */
.tool-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none !important;
    color: var(--primary); 
    background: rgba(234, 88, 12, 0.05);
    border: 1px solid rgba(234, 88, 12, 0.2);
    border-radius: 6px;
    padding: 5px 10px;
    margin-top: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.tool-link:hover {
    background: var(--primary);
    color: white;
}

.tool-img {
    height: 24px;
    width: 24px;
    border-radius: 4px;
    object-fit: cover;
    background: white;
}

/* Task Banner */
.task-banner {
    background: #fffbeb;
    border-left: 5px solid #f59e0b;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 20px;
}
.task-banner h4 { color: #d97706; }
.task-banner p { font-weight: 600; color: #92400e; }
/* --- Dashboard Header Row and Actions --- */
.dashboard-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
    flex-wrap: wrap;
}

.dashboard-actions-group {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.dashboard-actions-group select {
    width: auto;
}

/* --- Admin Sidebar Layout Redesign --- */
.admin-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
    background: #f1f5f9; /* Slate 100 for premium light feel */
    overflow: hidden;
}

.admin-sidebar {
    width: 280px;
    background: #ffffff; /* Bright design requested by user */
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: relative;
    box-shadow: 4px 0 25px rgba(0,0,0,0.05);
    z-index: 50;
    border-right: 1px solid var(--border);
}

/* Background Mascot for Sidebar */
.admin-sidebar::after {
    content: "";
    position: absolute;
    bottom: -20px;
    right: -30px;
    width: 250px;
    height: 250px;
    background: url('frog_data.jpg') no-repeat center bottom;
    background-size: contain;
    opacity: 0.08;
    z-index: -1;
    pointer-events: none;
    transform: scaleX(-1);
}

.admin-sidebar-header {
    padding: 1.5rem;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.admin-sidebar-header img {
    height: 80px;
    border-radius: 14px;
    border: 2px solid rgba(0,0,0,0.05);
    box-shadow: 0 4px 10px -2px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    background: white;
    transition: transform 0.3s ease;
}
.admin-sidebar-header img:hover {
    transform: scale(1.05) translateY(-2px);
}

.admin-sidebar-header h2 {
    color: var(--text-dark);
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0;
}

.admin-sidebar-menu {
    flex: 1;
    padding: 1.5rem 0;
    overflow-y: auto;
    z-index: 10;
}

.sidebar-group {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 800;
    letter-spacing: 1.5px;
    padding: 0 1.5rem;
    margin-bottom: 0.75rem;
    margin-top: 2rem;
}
.sidebar-group:first-child { margin-top: 0; }

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.5rem;
    color: #475569;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 12px;
    cursor: pointer;
    border-left: 3px solid transparent;
    position: relative;
}

.sidebar-link:hover {
    background: #f8fafc;
    color: var(--primary);
    padding-left: 1.75rem;
}

.sidebar-link.active {
    background: var(--primary-glow);
    color: var(--primary);
    border-left: 4px solid var(--primary);
    font-weight: 700;
}
.sidebar-link.active::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
}

.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    position: relative;
    background: url('data:image/svg+xml;utf8,<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><circle cx="2" cy="2" r="1" fill="rgba(0,0,0,0.03)"/></svg>');
}

.admin-topbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    min-height: 75px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2.5rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    flex-shrink: 0;
    z-index: 40;
    box-shadow: 0 4px 20px -2px rgba(0,0,0,0.03);
}

.admin-topbar .ci-header-right {
    min-width: unset;
}

.admin-content {
    flex: 1;
    overflow-y: auto;
    padding: 2.5rem;
}

.app-view {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.app-view.active {
    display: block;
}
.zebra-shortcut-legend {
    display: none !important;
}
.zebra-mode .zebra-shortcut-legend {
    display: block !important;
}

/* --- Zebra TC22 Scanner Mode Optimizations --- */
.zebra-mode {
    --bg-color: #0f172a; /* Premium dark theme for industrial environments / battery saving */
    --panel-bg: #1e293b;
    --text-dark: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    background-color: var(--bg-color) !important;
    color: var(--text-dark) !important;
}

/* Clear text legibility in dark Zebra Mode */
.zebra-mode label,
.zebra-mode h1,
.zebra-mode h2,
.zebra-mode h3,
.zebra-mode h4,
.zebra-mode h5,
.zebra-mode p,
.zebra-mode span:not(.btn):not(.badge):not(.toast),
.zebra-mode strong:not(.danger-state):not(.warning-state),
.zebra-mode th,
.zebra-mode td,
.zebra-mode li,
.zebra-mode a:not(.btn) {
    color: #f8fafc !important;
}

.zebra-mode select option {
    background: #1e293b !important;
    color: #f8fafc !important;
}

.zebra-mode .text-muted,
.zebra-mode .text-gray-500 {
    color: #94a3b8 !important;
}

/* Zebra Mode UI Adaptations */
.zebra-mode .container {
    max-width: 100% !important;
    padding: 0 0.5rem !important;
}

.zebra-mode .ci-header {
    background: #1e293b !important;
    border-bottom: 4px solid var(--primary) !important;
    padding: 0.6rem 0.8rem !important;
    margin-bottom: 1rem !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

.zebra-mode .hamma-ci-logo {
    max-height: 35px !important;
    max-width: 90px !important;
}

.zebra-mode .ci-header-controls button {
    background: #1e293b !important;
    color: #f8fafc !important;
    border: 1px solid #334155 !important;
}

.zebra-mode .ci-header-controls button[onclick*="performLogout"] {
    background: #450a0a !important;
    color: #fca5a5 !important;
    border: 1px solid #f87171 !important;
}

.zebra-mode #ui_header_title,
.zebra-mode #ui_m_name {
    font-size: 1.15rem !important;
    font-weight: 800 !important;
}

/* Hide non-essential layout blocks to keep page scroll-free */
.zebra-mode .calculator-panel,
.zebra-mode .whats-new-link,
.zebra-mode .task-banner,
.zebra-mode .ci-header-right,
.zebra-mode #whatsNewModal,
.zebra-mode #licenseModal,
.zebra-mode .tool-link,
.zebra-mode #measureForm > div:first-child img { /* Hide frog mascot image */
    display: none !important;
}

/* Enlarge Inputs and Buttons for Single-Thumb Tapping on the Zebra TC22 6.0" screen */
.zebra-mode input, 
.zebra-mode select, 
.zebra-mode textarea {
    padding: 0.6rem 0.8rem !important;
    font-size: 1rem !important;
    height: 52px !important;
    background: #0f172a !important;
    color: #f8fafc !important;
    border: 2px solid #475569 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    text-overflow: ellipsis !important;
}

.zebra-mode input:focus, 
.zebra-mode select:focus, 
.zebra-mode textarea:focus {
    border-color: #ffb703 !important; /* bright orange-yellow focus indicator, matching Zebra scanner accents */
    box-shadow: 0 0 0 4px rgba(255, 183, 3, 0.5) !important;
    outline: none !important;
}

.zebra-mode button:focus,
.zebra-mode .btn:focus,
.zebra-mode .btn-submit:focus,
.zebra-mode .tab-btn:focus,
.zebra-mode a:focus {
    outline: 3px solid #ffb703 !important;
    outline-offset: 2px !important;
}

.zebra-mode .btn, 
.zebra-mode .btn-submit {
    padding: 0.8rem 1rem !important;
    font-size: 1rem !important;
    min-height: 52px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    text-align: center !important;
}

.zebra-mode .tab-btn {
    font-size: 0.9rem !important;
    padding: 0.5rem 0.4rem !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: normal !important;
    line-height: 1.2 !important;
    flex: 1 1 auto !important;
    box-sizing: border-box !important;
}

.zebra-mode .tabs {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 5px !important;
    width: 100% !important;
}

.zebra-mode .glass-panel,
.zebra-mode .card {
    padding: 1rem !important;
    border-radius: 8px !important;
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    margin-bottom: 1rem !important;
}

.zebra-mode .form-row {
    grid-template-columns: 1fr !important;
    gap: 0.8rem !important;
    margin-bottom: 0.8rem !important;
}

/* High Contrast Alert States for Industrial Environments */
.zebra-mode .danger-state {
    background: #450a0a !important;
    border: 3px solid #f87171 !important;
    color: #fca5a5 !important;
}

.zebra-mode .warning-state {
    background: #451a03 !important;
    border: 3px solid #fbbf24 !important;
    color: #fde68a !important;
}

.zebra-mode table th,
.zebra-mode table td {
    padding: 10px 8px !important;
    font-size: 0.95rem !important;
}

/* --- High-Tech Transitions & Animations for Zebra Toggling --- */
body, 
.container, 
.ci-header, 
.glass-panel, 
.card, 
input, 
select, 
textarea, 
.btn, 
.btn-submit, 
.tab-btn, 
header,
main {
    transition: background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                color 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                font-size 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Fullscreen Laser Scanner Sweep Overlay */
.zebra-scan-sweep {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 999999;
    background: linear-gradient(
        to bottom,
        rgba(255, 183, 3, 0) 0%,
        rgba(255, 183, 3, 0) 40%,
        rgba(255, 183, 3, 0.8) 50%,
        rgba(255, 183, 3, 0.9) 51%,
        rgba(255, 183, 3, 0.8) 52%,
        rgba(255, 183, 3, 0) 62%,
        rgba(255, 183, 3, 0) 100%
    );
    background-size: 100% 200%;
    animation: laserSweep 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes laserSweep {
    0% {
        background-position: 0% -100%;
        opacity: 0;
    }
    15% {
        opacity: 1;
    }
    85% {
        opacity: 1;
    }
    100% {
        background-position: 0% 100%;
        opacity: 0;
    }
}

/* Cyberpunk Digital Glitch/Warp Transition Effect */
.zebra-transition-active {
    animation: digitalGlitch 0.6s ease-in-out;
}

@keyframes digitalGlitch {
    0% {
        filter: hue-rotate(0deg) blur(0px);
        transform: scale(1);
    }
    25% {
        filter: hue-rotate(45deg) blur(1.5px) contrast(1.3);
        transform: scale(0.985);
    }
    75% {
        filter: hue-rotate(-30deg) blur(0.5px) contrast(1.1);
        transform: scale(1.008);
    }
    100% {
        filter: hue-rotate(0deg) blur(0px);
        transform: scale(1);
    }
}

/* --- Coolant Barrel Visual Widget --- */
.barrel-container {
    width: 65px;
    height: 90px;
    border: 3px solid #64748b;
    border-radius: 8px 8px 10px 10px;
    position: relative;
    overflow: hidden;
    background: #e2e8f0;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1), 0 4px 6px -1px rgba(0,0,0,0.05);
    flex-shrink: 0;
}
.zebra-mode .barrel-container {
    border-color: var(--primary);
    background: #334155;
}
.barrel-fluid {
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
    background: linear-gradient(to top, var(--primary), #34d399);
    transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.barrel-rings {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    pointer-events: none;
}
.barrel-ring {
    height: 3px;
    background: rgba(100, 116, 139, 0.4);
    width: 100%;
}
.zebra-mode .barrel-ring {
    background: rgba(255, 255, 255, 0.2);
}

/* --- Zebra-Mode Custom Overrides for Dashboard Layout & Banners --- */
.zebra-mode .dashboard-header-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    margin-bottom: 20px !important;
}

.zebra-mode .dashboard-header-row h2 {
    margin-bottom: 4px !important;
    font-size: 1.4rem !important;
}

.zebra-mode .dashboard-actions-group {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    gap: 10px !important;
}

.zebra-mode .dashboard-actions-group select {
    width: 100% !important;
    max-width: 100% !important;
    height: 52px !important;
    flex: none !important;
}

.zebra-mode .dashboard-actions-group .btn {
    width: 100% !important;
    min-height: 52px !important;
    margin: 0 !important;
    flex: none !important;
}

/* Fix for supplierLinkCodeBanner white block in Zebra mode */
.zebra-mode #supplierLinkCodeBanner {
    background: #1e293b !important;
    color: #f8fafc !important;
    border: 1px dashed var(--primary) !important;
}

/* Warning & Predictive Maintenance Banners in Zebra mode */
.zebra-mode #predictiveMaintenanceBanner {
    background: #451a03 !important;
    border: 1px solid #fbbf24 !important;
}

.zebra-mode #predictiveMaintenanceBanner h4 {
    color: #fbbf24 !important;
}

.zebra-mode #predictiveMaintenanceBanner #predictiveAlertMessage {
    color: #fef3c7 !important;
}

/* --- Admin Inner Panel --- */
.admin-inner-panel {
    background: #f8fafc;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    border: 1px dashed #cbd5e1;
}

/* --- Zebra-Mode Management/Verwaltung Styles --- */
.zebra-mode .admin-inner-panel {
    background: #1e293b !important;
    border: 1px dashed #475569 !important;
    color: #f8fafc !important;
}

/* Stacking tables inside Admin tab under Zebra mode */
.zebra-mode #tab-admin table {
    display: block !important;
    width: 100% !important;
    min-width: 100% !important;
    border: none !important;
}

.zebra-mode #tab-admin thead {
    display: none !important; /* Hide header rows since we add labels */
}

.zebra-mode #tab-admin tbody {
    display: block !important;
    width: 100% !important;
}

.zebra-mode #tab-admin tr {
    display: block !important;
    width: 100% !important;
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    border-radius: 8px !important;
    padding: 12px !important;
    margin-bottom: 15px !important;
    box-sizing: border-box !important;
}

.zebra-mode #tab-admin td {
    display: block !important;
    width: 100% !important;
    padding: 6px 0 !important;
    border: none !important;
    box-sizing: border-box !important;
}

.zebra-mode #tab-admin td input,
.zebra-mode #tab-admin td select {
    width: 100% !important;
    margin-bottom: 5px !important;
}

/* Side-by-side or stacked buttons in stacked table cell */
.zebra-mode #tab-admin td:last-child {
    display: flex !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

.zebra-mode #tab-admin td:last-child button,
.zebra-mode #tab-admin td:last-child a {
    flex: 1 !important;
    min-height: 48px !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Custom vertical stacked labels */
.zebra-mode #usersTableBody td:nth-child(1)::before {
    content: "Username:" !important;
    display: block !important;
    font-size: 0.8rem !important;
    font-weight: bold !important;
    color: #94a3b8 !important;
    margin-bottom: 4px !important;
}
.zebra-mode #usersTableBody td:nth-child(2)::before {
    content: "E-Mail:" !important;
    display: block !important;
    font-size: 0.8rem !important;
    font-weight: bold !important;
    color: #94a3b8 !important;
    margin-bottom: 4px !important;
}
.zebra-mode #usersTableBody td:nth-child(3)::before {
    content: "Rolle:" !important;
    display: block !important;
    font-size: 0.8rem !important;
    font-weight: bold !important;
    color: #94a3b8 !important;
    margin-bottom: 4px !important;
}

.zebra-mode #suppliersTableBody td:nth-child(1)::before {
    content: "Lieferant:" !important;
    display: block !important;
    font-size: 0.8rem !important;
    font-weight: bold !important;
    color: #94a3b8 !important;
    margin-bottom: 4px !important;
}
.zebra-mode #suppliersTableBody td:nth-child(2)::before {
    content: "Typ:" !important;
    display: block !important;
    font-size: 0.8rem !important;
    font-weight: bold !important;
    color: #94a3b8 !important;
    margin-bottom: 4px !important;
}
.zebra-mode #suppliersTableBody td:nth-child(3)::before {
    content: "Status:" !important;
    display: block !important;
    font-size: 0.8rem !important;
    font-weight: bold !important;
    color: #94a3b8 !important;
    margin-bottom: 4px !important;
}

.zebra-mode #adminMachinesTableBody td:nth-child(1)::before {
    content: "Nr.:" !important;
    display: block !important;
    font-size: 0.8rem !important;
    font-weight: bold !important;
    color: #94a3b8 !important;
    margin-bottom: 4px !important;
}
.zebra-mode #adminMachinesTableBody td:nth-child(2)::before {
    content: "Bezeichnung:" !important;
    display: block !important;
    font-size: 0.8rem !important;
    font-weight: bold !important;
    color: #94a3b8 !important;
    margin-bottom: 4px !important;
}
.zebra-mode #adminMachinesTableBody td:nth-child(3)::before {
    content: "Kühlschmierstoff:" !important;
    display: block !important;
    font-size: 0.8rem !important;
    font-weight: bold !important;
    color: #94a3b8 !important;
    margin-bottom: 4px !important;
}

/* Stacking for Machine Groups list in Zebra mode */
.zebra-mode #groupsList li {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    border-radius: 8px !important;
    padding: 12px !important;
    margin-bottom: 12px !important;
    gap: 8px !important;
}

.zebra-mode #groupsList li input {
    width: 100% !important;
    flex: none !important;
}

.zebra-mode #groupsList li button {
    width: 100% !important;
    min-height: 48px !important;
    margin: 0 !important;
}

/* --- Collapsible Card (Details/Dropdown) Styles --- */
details.card {
    transition: all 0.2s ease;
}

details.card summary {
    cursor: pointer;
    list-style: none;
    outline: none;
    user-select: none;
}

details.card summary::-webkit-details-marker {
    display: none;
}

details.card summary::after {
    content: "▼";
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
    margin-left: 10px;
}

details.card[open] summary::after {
    content: "▲";
}

