/* =============================================
           OWL :: CSS VARIABLES
        ============================================= */
        :root {
            --primary-color: #607D8B;
            --primary-dark:  #455A64;
            --primary-light: #90A4AE;
            --accent-color:  #78909C;
            --sidebar-bg:    #37474F;
            --sidebar-icon-bg: #263238;
            --topbar-height: 60px;
            --sidebar-icon-width: 60px;
            --sidebar-menu-width: 230px;
            --text-color: rgba(0,0,0,0.87);
            --text-secondary: rgba(0,0,0,0.6);
            --surface-a: #ffffff;
            --surface-b: #fafafa;
            --surface-d: rgba(0,0,0,0.12);
            --border-radius: 4px;
            --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
            --shadow-md: 0 4px 10px rgba(0,0,0,0.15);
        }

        /* =============================================
           RESET & BASE
        ============================================= */
        * { margin: 0; padding: 0; box-sizing: border-box; }

        body {
            font-family: Roboto, 'Helvetica Neue', Arial, sans-serif;
            background: var(--surface-b);
            color: var(--text-color);
            font-size: 14px;
            line-height: 1.5;
            min-height: 100vh;
        }

        /* =============================================
           LAYOUT WRAPPER
        ============================================= */
        .layout-wrapper {
            display: flex;
            flex-direction: column;
            min-height: 100vh;
        }

        /* =============================================
           TOPBAR
        ============================================= */
        .topbar {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: var(--topbar-height);
            background: var(--primary-color);
            display: flex;
            align-items: center;
            z-index: 1000;
            box-shadow: var(--shadow-md);
        }

        .topbar .logo {
            width: var(--sidebar-icon-width);
            height: var(--topbar-height);
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--sidebar-icon-bg);
            flex-shrink: 0;
            text-decoration: none;
        }

        .topbar .logo span {
            color: #fff;
            font-size: 20px;
            font-weight: 700;
            letter-spacing: -1px;
        }

        .topbar-title {
            color: rgba(255,255,255,0.9);
            font-size: 16px;
            font-weight: 500;
            letter-spacing: 0.3px;
            padding: 0 20px;
            flex: 1;
        }

        .topbar-menu {
            display: flex;
            align-items: center;
            gap: 0;
            list-style: none;
            margin-left: auto;
            height: 100%;
        }

        /* Search in topbar */
        .topbar-search {
            display: flex;
            align-items: center;
            padding: 0 16px;
            height: 100%;
        }

        .topbar-search-input {
            background: rgba(255,255,255,0.15);
            border: 1px solid rgba(255,255,255,0.3);
            border-radius: 20px;
            color: #fff;
            padding: 6px 36px 6px 14px;
            font-size: 13px;
            outline: none;
            width: 200px;
            transition: all 0.2s;
        }

        .topbar-search-input::placeholder { color: rgba(255,255,255,0.6); }
        .topbar-search-input:focus {
            background: rgba(255,255,255,0.22);
            border-color: rgba(255,255,255,0.6);
            width: 240px;
        }

        .topbar-search-wrap {
            position: relative;
        }

        .topbar-search-wrap .pi-search {
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            color: rgba(255,255,255,0.7);
            font-size: 14px;
            pointer-events: none;
        }

        .topbar-search-dropdown {
            position: absolute;
            top: 100%;
            right: 0;
            margin-top: 8px;
            width: 400px;
            max-height: 500px;
            overflow-y: auto;
            background: var(--surface-a);
            border: 1px solid var(--surface-d);
            border-radius: 6px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            z-index: 1000;
        }

        .dropdown-section-title {
            padding: 12px 16px 8px;
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            color: var(--text-secondary);
            letter-spacing: 0.5px;
        }

        .dropdown-item {
            display: block;
            padding: 10px 16px;
            color: var(--text-color);
            text-decoration: none;
            transition: background 0.2s;
            border-left: 3px solid transparent;
        }

        .dropdown-item:hover {
            background: var(--surface-b);
            border-left-color: var(--primary-color);
        }

        /* User profile in topbar */
        .topbar-profile {
            display: flex;
            align-items: center;
            padding: 0 16px;
            height: 100%;
            cursor: pointer;
            gap: 10px;
            transition: background 0.2s;
            position: relative;
        }

        .topbar-profile:hover { background: rgba(255,255,255,0.1); }

        .profile-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: var(--primary-dark);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            font-weight: 600;
            color: #fff;
            border: 2px solid rgba(255,255,255,0.4);
        }

        .profile-info {
            display: flex;
            flex-direction: column;
        }

        .profile-name {
            color: #fff;
            font-size: 13px;
            font-weight: 500;
            line-height: 1.2;
        }

        .profile-role {
            color: rgba(255,255,255,0.65);
            font-size: 11px;
        }

        /* Dropdown */
        .topbar-profile-dropdown {
            display: none;
            position: absolute;
            top: calc(100% + 4px);
            right: 0;
            background: #fff;
            border-radius: var(--border-radius);
            box-shadow: 0 4px 16px rgba(0,0,0,0.18);
            min-width: 180px;
            z-index: 999;
            overflow: hidden;
            animation: fadeSlideDown 0.15s ease;
        }

        @keyframes fadeSlideDown {
            from { opacity: 0; transform: translateY(-6px); }
            to   { opacity: 1; transform: translateY(0); }
        }

        .topbar-profile.active .topbar-profile-dropdown { display: block; }

        .topbar-profile-dropdown a {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 16px;
            color: var(--text-color);
            text-decoration: none;
            font-size: 13px;
            transition: background 0.15s;
        }

        .topbar-profile-dropdown a:hover { background: var(--surface-b); }
        .topbar-profile-dropdown a i { color: var(--primary-color); font-size: 14px; width: 16px; }

        /* =============================================
           SIDEBAR
        ============================================= */
        .layout-sidebar {
            position: fixed;
            top: var(--topbar-height);
            left: 0;
            bottom: 0;
            width: var(--sidebar-icon-width);
            background: var(--sidebar-icon-bg);
            z-index: 900;
            transition: width 0.2s ease;
        }

        /* Tab icon nav (left column) */
        .layout-tabmenu {
            display: flex;
            flex-direction: row;
            height: 100%;
        }

        .layout-tabmenu-nav {
            list-style: none;
            width: var(--sidebar-icon-width);
            background: var(--sidebar-icon-bg);
            flex-shrink: 0;
        }

        .layout-tabmenu-nav li {
            position: relative;
        }

        .layout-tabmenu-nav li > a {
            display: flex;
            align-items: center;
            justify-content: center;
            height: var(--sidebar-icon-width);
            width: var(--sidebar-icon-width);
            color: rgba(255,255,255,0.55);
            text-decoration: none;
            font-size: 18px;
            transition: all 0.2s;
            cursor: pointer;
        }

        .layout-tabmenu-nav li > a:hover,
        .layout-tabmenu-nav li.active > a {
            color: #fff;
            background: rgba(255,255,255,0.08);
        }

        .layout-tabmenu-nav li.active > a {
            border-left: 3px solid var(--primary-light);
            color: #fff;
        }

        /* Tooltip on hover */
        .tabmenu-tooltip {
            position: absolute;
            left: calc(var(--sidebar-icon-width) + 8px);
            top: 50%;
            transform: translateY(-50%);
            background: rgba(0,0,0,0.75);
            color: #fff;
            padding: 4px 10px;
            border-radius: 3px;
            font-size: 12px;
            white-space: nowrap;
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.15s;
            z-index: 9999;
        }

        .layout-tabmenu-nav li:hover .tabmenu-tooltip { opacity: 1; }

        /* Submenu panel */
        .layout-tabmenu-contents {
            width: 0;
            overflow: hidden;
            background: var(--sidebar-bg);
            transition: width 0.2s ease;
        }

        .layout-sidebar.menu-open {
            width: calc(var(--sidebar-icon-width) + var(--sidebar-menu-width));
        }

        .layout-sidebar.menu-open .layout-tabmenu-contents {
            width: var(--sidebar-menu-width);
        }

        .layout-tabmenu-content { display: none; height: 100%; }
        .layout-tabmenu-content.active { display: flex; flex-direction: column; }

        .layout-submenu-title {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 16px 16px 10px;
            color: rgba(255,255,255,0.5);
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            border-bottom: 1px solid rgba(255,255,255,0.07);
        }

        .layout-submenu-title .close-btn {
            color: rgba(255,255,255,0.4);
            cursor: pointer;
            font-size: 16px;
            transition: color 0.15s;
            text-decoration: none;
        }

        .layout-submenu-title .close-btn:hover { color: rgba(255,255,255,0.8); }

        .menu-scroll-content { overflow-y: auto; flex: 1; padding-bottom: 16px; }

        .navigation-menu { list-style: none; padding: 8px 0; }

        .navigation-menu li a {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 9px 16px;
            color: rgba(255,255,255,0.7);
            text-decoration: none;
            font-size: 13px;
            transition: all 0.15s;
            border-left: 3px solid transparent;
        }

        .navigation-menu li a:hover {
            color: #fff;
            background: rgba(255,255,255,0.07);
            border-left-color: var(--primary-light);
        }

        .navigation-menu li a i {
            font-size: 14px;
            width: 18px;
            color: rgba(255,255,255,0.45);
        }

        .navigation-menu li a:hover i { color: var(--primary-light); }

        .nav-section-title {
            padding: 12px 16px 4px;
            color: rgba(255,255,255,0.3);
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            font-weight: 600;
        }

        .nav-divider {
            border: none;
            border-top: 1px solid rgba(255,255,255,0.07);
            margin: 6px 0;
        }

        /* =============================================
           MAIN CONTENT AREA
        ============================================= */
        .layout-main {
            margin-top: var(--topbar-height);
            margin-left: var(--sidebar-icon-width);
            padding: 24px;
            min-height: calc(100vh - var(--topbar-height));
            transition: margin-left 0.2s ease;
        }

        .layout-sidebar.menu-open ~ .layout-main {
            margin-left: calc(var(--sidebar-icon-width) + var(--sidebar-menu-width));
        }

        /* =============================================
           CARDS
        ============================================= */
        .card {
            background: var(--surface-a);
            border-radius: var(--border-radius);
            padding: 24px;
            box-shadow: var(--shadow-sm);
            margin-bottom: 20px;
        }

        .card-title {
            color: var(--primary-dark);
            font-size: 16px;
            font-weight: 500;
            margin-bottom: 20px;
            padding-bottom: 12px;
            border-bottom: 2px solid var(--primary-color);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .card-title i { color: var(--primary-color); }

        /* =============================================
           FORMS
        ============================================= */
        .form-group {
            margin-bottom: 16px;
        }

        label {
            display: block;
            margin-bottom: 5px;
            font-size: 12px;
            font-weight: 500;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        input[type="text"],
        input[type="email"],
        input[type="tel"],
        input[type="date"],
        input[type="number"],
        input[type="password"],
        select,
        textarea {
            width: 100%;
            padding: 9px 12px;
            border: 1px solid var(--surface-d);
            border-radius: var(--border-radius);
            font-size: 14px;
            font-family: inherit;
            color: var(--text-color);
            background: var(--surface-a);
            transition: border-color 0.2s, box-shadow 0.2s;
            outline: none;
        }

        input:focus, select:focus, textarea:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 2px rgba(96,125,139,0.15);
        }

        .form-error {
            color: #e74c3c;
            font-size: 11px;
            margin-top: 3px;
        }

        .form-success {
            color: #27ae60;
            font-size: 12px;
            margin-top: 3px;
        }

        .form-warning {
            color: #f39c12;
            font-size: 12px;
            margin-top: 3px;
        }

        /* =============================================
           BUTTONS
        ============================================= */
        .btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 8px 18px;
            border-radius: var(--border-radius);
            border: none;
            font-family: inherit;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
            text-decoration: none;
        }

        .btn-primary { background: var(--primary-color); color: #fff; }
        .btn-primary:hover { background: var(--primary-dark); }
        .btn-primary:disabled { background: #b0bec5; cursor: not-allowed; }

        .btn-secondary { background: #eceff1; color: #546e7a; }
        .btn-secondary:hover { background: #cfd8dc; }

        .btn-success { background: #43a047; color: #fff; }
        .btn-success:hover { background: #388e3c; }

        .btn-danger { background: #e53935; color: #fff; }
        .btn-danger:hover { background: #c62828; }

        .btn-sm { padding: 5px 12px; font-size: 12px; }

        .btn-group {
            display: flex;
            gap: 10px;
            margin-top: 20px;
            flex-wrap: wrap;
        }

        /* =============================================
           TABLES
        ============================================= */
        .table-wrapper {
            overflow-x: auto;
            border-radius: var(--border-radius);
            border: 1px solid var(--surface-d);
        }

        table {
            width: 100%;
            border-collapse: collapse;
        }

        thead tr {
            background: var(--primary-color);
        }

        thead th {
            padding: 12px 14px;
            text-align: left;
            color: #fff;
            font-size: 12px;
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            white-space: nowrap;
        }

        tbody tr {
            border-bottom: 1px solid var(--surface-d);
            transition: background 0.15s;
        }

        tbody tr:last-child { border-bottom: none; }
        tbody tr:hover { background: #f5f7f8; }

        tbody td {
            padding: 11px 14px;
            font-size: 13px;
            color: var(--text-color);
        }

        .action-buttons {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
        }

        /* =============================================
           SEARCH BOX
        ============================================= */
        .search-box {
            position: relative;
            margin-bottom: 18px;
            max-width: 380px;
        }

        .search-box input {
            padding-left: 36px;
        }

        .search-box::before {
            content: '🔍';
            position: absolute;
            left: 10px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 14px;
            pointer-events: none;
            opacity: 0.5;
        }

        /* =============================================
           BADGES
        ============================================= */
        .badge {
            display: inline-block;
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 11px;
            font-weight: 500;
            vertical-align: middle;
        }

        .badge-primary { background: #e3eaf0; color: var(--primary-dark); }
        .badge-success { background: #e8f5e9; color: #2e7d32; }
        .badge-warning { background: #fff8e1; color: #f57f17; }
        .badge-danger  { background: #ffebee; color: #c62828; }

        /* =============================================
           ADDRESS CARDS
        ============================================= */
        .address-item {
            background: var(--surface-b);
            border: 1px solid var(--surface-d);
            border-left: 4px solid var(--primary-color);
            border-radius: var(--border-radius);
            padding: 14px 16px;
            margin-bottom: 10px;
        }

        .address-item.primary { border-left-color: #43a047; }

        .address-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 6px;
        }

        .address-type {
            font-weight: 500;
            font-size: 13px;
            color: var(--primary-dark);
        }

        /* =============================================
           GRID
        ============================================= */
        .grid-2 {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 16px;
        }

        .grid-3 {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 16px;
        }

        @media (max-width: 768px) {
            .grid-2, .grid-3 { grid-template-columns: 1fr; }

            .layout-main { padding: 16px; }

            .layout-sidebar.menu-open ~ .layout-main {
                margin-left: var(--sidebar-icon-width);
            }
        }

        /* =============================================
           LOADING / EMPTY STATE
        ============================================= */
        .loading-state, .empty-state {
            text-align: center;
            padding: 40px 20px;
            color: var(--text-secondary);
        }

        .loading-spinner {
            width: 32px;
            height: 32px;
            border: 3px solid var(--surface-d);
            border-top-color: var(--primary-color);
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            margin: 0 auto 12px;
        }

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

        @keyframes pulse {
            0%   { box-shadow: 0 0 0 0   rgba(229,57,53,0.5); }
            70%  { box-shadow: 0 0 0 10px rgba(229,57,53,0);   }
            100% { box-shadow: 0 0 0 0   rgba(229,57,53,0);   }
        }

        /* =============================================
           MEASUREMENT-SPECIFIC
        ============================================= */
        .pkg-card {
            background: var(--surface-b);
            border: 1px solid var(--surface-d);
            border-radius: var(--border-radius);
            margin-bottom: 16px;
            overflow: hidden;
        }

        .pkg-header {
            background: var(--primary-color);
            color: #fff;
            padding: 10px 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .pkg-header h4 { font-size: 13px; font-weight: 500; }

        .pkg-body { padding: 14px 16px; }

        .pkg-stats {
            display: flex;
            gap: 20px;
            margin-bottom: 12px;
            flex-wrap: wrap;
        }

        .pkg-stat {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .pkg-stat-label {
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: var(--text-secondary);
        }

        .pkg-stat-value {
            font-size: 16px;
            font-weight: 500;
            color: var(--primary-dark);
        }

        .board-group {
            background: var(--surface-a);
            border: 1px solid var(--surface-d);
            border-radius: var(--border-radius);
            padding: 10px 14px;
            margin-bottom: 8px;
        }

        .board-group-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 12px;
            color: var(--text-secondary);
        }

        .board-widths {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            margin-top: 8px;
        }

        .board-chip {
            background: #e3eaf0;
            color: var(--primary-dark);
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 12px;
        }

        /* Tabellarische Brett-Anzeige */
        .boards-table-wrap {
            overflow-x: auto;
            margin-top: 8px;
            border-radius: var(--border-radius);
            border: 1px solid var(--surface-d);
        }

        .boards-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 12px;
        }

        .boards-table thead tr {
            background: var(--primary-color);
        }

        .boards-table thead th {
            padding: 7px 10px;
            text-align: left;
            color: #fff;
            font-size: 11px;
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            white-space: nowrap;
        }

        .boards-table thead th.num { text-align: right; }

        .boards-table tbody tr {
            border-bottom: 1px solid var(--surface-d);
        }

        .boards-table tbody tr:last-child { border-bottom: none; }

        .boards-table tbody tr:nth-child(even) { background: var(--surface-b); }

        .boards-table tbody tr:hover { background: #eceff1; }

        .boards-table tbody td {
            padding: 6px 10px;
            color: var(--text-color);
        }

        .boards-table tbody td.num { text-align: right; font-variant-numeric: tabular-nums; }

        .boards-table tfoot td {
            padding: 6px 10px;
            font-weight: 600;
            font-size: 11px;
            background: #eceff1;
            color: var(--primary-dark);
        }

        .boards-table tfoot td.num { text-align: right; }

        .board-widths-cell {
            display: flex;
            flex-wrap: wrap;
            gap: 3px;
        }

        .board-chip {
            background: #e3eaf0;
            color: var(--primary-dark);
            padding: 1px 6px;
            border-radius: 8px;
            font-size: 11px;
            white-space: nowrap;
        }

        .board-chip-deletable {
            cursor: pointer;
            background: #fce4ec;
            color: #c62828;
            border: 1px solid #ef9a9a;
            transition: background 0.15s, transform 0.1s;
        }

        .board-chip-deletable:hover {
            background: #e53935;
            color: #fff;
            transform: scale(1.08);
        }

        .quick-input-area {
            background: var(--surface-b);
            border: 1px dashed var(--surface-d);
            border-radius: var(--border-radius);
            padding: 12px;
            margin-top: 10px;
        }

        .quick-input-area textarea {
            font-size: 13px;
            font-family: monospace;
            resize: vertical;
        }

        /* Chip-Vorschau in der Schnelleingabe */
        /* ── Chip-Eingabefeld ─────────────────────────────── */
        /* Das sichtbare "Eingabefeld" — wirkt wie ein input,
           enthält aber Chips + einen unsichtbaren Cursor am Ende */
        .qi-field {
            display: flex;
            flex-wrap: wrap;        /* Chips umbrechen automatisch */
            align-items: flex-start; /* Chips oben ausrichten bei Mehrzeiligkeit */
            align-content: flex-start;
            gap: 4px 5px;           /* Zeilen- und Spaltenabstand */
            min-height: 44px;
            max-height: 200px;
            overflow-y: auto;
            padding: 7px 10px;
            border: 1px solid #ccc;
            border-radius: var(--border-radius);
            background: #fff;
            cursor: text;
            transition: border-color 0.15s;
            box-sizing: border-box;
            line-height: 1.6;
        }
        .qi-field:focus-within {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 2px rgba(25,118,210,0.15);
            outline: none;
        }
        .qi-field.has-error {
            border-color: #EF9A9A;
            box-shadow: 0 0 0 2px rgba(198,40,40,0.1);
        }

        /* Placeholder wenn leer */
        .qi-field .qi-placeholder {
            color: #aaa;
            font-size: 13px;
            font-family: monospace;
            pointer-events: none;
            user-select: none;
        }

        /* Das echte Input — transparent, klebt ans Ende der letzten Chip-Reihe */
        .qi-field .qi-cursor {
            border: none;
            outline: none;
            background: transparent;
            font-family: monospace;
            font-size: 13px;
            min-width: 60px;        /* Mindestbreite damit man tippen kann */
            width: 60px;            /* Feste Basis — wächst nur mit Inhalt */
            flex-grow: 1;           /* Nimmt restliche Breite in der aktuellen Zeile */
            flex-shrink: 1;         /* Darf schrumpfen damit Chips umbrechen können */
            flex-basis: 60px;
            padding: 0;
            line-height: 1.8;
            caret-color: var(--primary-color);
        }

        /* Einzelner Chip */
        .qi-chip {
            display: inline-flex;
            align-items: center;
            gap: 3px;
            padding: 2px 9px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 500;
            font-family: monospace;
            line-height: 1.5;
            white-space: nowrap;
            cursor: default;
            user-select: none;
        }

        .qi-chip.laenge {
            background: #E3F2FD;
            color: #1565C0;
            border: 1px solid #90CAF9;
        }
        .qi-chip.laenge::before { content: '\21D4'; margin-right:1px; font-size: 9px; }

        .qi-chip.breite {
            background: #E8F5E9;
            color: #2E7D32;
            border: 1px solid #A5D6A7;
        }
        .qi-chip.breite::before { content: '\21D5'; margin-right:1px; font-size: 9px; }

        .qi-chip.fehler {
            background: #FFEBEE;
            color: #C62828;
            border: 1px solid #EF9A9A;
            text-decoration: line-through;
        }
        .qi-chip.fehler::before { content: '\2715'; margin-right:1px; font-size: 9px; }

        .qi-chip.warnung {
            background: #FFF3E0;
            color: #E65100;
            border: 1px solid #FFCC80;
        }
        .qi-chip.warnung::before { content: '\26A0'; margin-right:1px; font-size: 9px; }

        /* Container für Chip-Vorschau unter der Textarea */
        .qi-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 4px 5px;
            margin-top: 6px;
        }

        .qi-chips-legend {
            display: flex;
            gap: 12px;
            margin-top: 5px;
            font-size: 11px;
            color: var(--text-secondary);
            flex-wrap: wrap;
        }

        /* =============================================
           BREADCRUMB / PAGE HEADER
        ============================================= */
        .page-header {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 20px;
        }

        .page-header h1 {
            font-size: 20px;
            font-weight: 500;
            color: var(--primary-dark);
        }

        .page-header .back-btn {
            color: var(--primary-color);
            cursor: pointer;
            font-size: 18px;
            text-decoration: none;
            display: flex;
            align-items: center;
            transition: color 0.15s;
        }

        .page-header .back-btn:hover { color: var(--primary-dark); }

        /* =============================================
           SUMMARY STATS BAR
        ============================================= */
        .stats-bar {
            display: flex;
            gap: 16px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .stat-card {
            background: var(--surface-a);
            border-radius: var(--border-radius);
            padding: 14px 20px;
            box-shadow: var(--shadow-sm);
            flex: 1;
            min-width: 120px;
            border-left: 4px solid var(--primary-color);
        }

        .stat-card-label {
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: var(--text-secondary);
            margin-bottom: 4px;
        }

        .stat-card-value {
            font-size: 22px;
            font-weight: 500;
            color: var(--primary-dark);
        }

        .hover-highlight:hover {
            background: var(--primary-color) !important;
            color: white !important;
        }

        .tab-button {
            flex: 1;
            padding: 14px 20px;
            background: var(--surface-a);
            border: none;
            border-bottom: 3px solid transparent;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            color: var(--text-secondary);
            transition: all 0.2s;
        }

        .tab-button:hover {
            background: var(--surface-b);
            color: var(--text-color);
        }

        .tab-button.active {
            color: var(--primary-color);
            border-bottom-color: var(--primary-color);
            background: var(--surface-a);
        }

        /* =============================================
           ICONS (unicode fallback for pi-icons)
        ============================================= */
        .pi::before { font-style: normal; }
        /* =============================================
           ANGEBOTE STATUS BADGES
        ============================================= */
        .status-badge {
            display: inline-block;
            padding: 2px 8px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 500;
        }
        .status-entwurf    { background:#E3F2FD; color:#1565C0; }
        .status-gesendet   { background:#FFF3E0; color:#E65100; }
        .status-angenommen { background:#E8F5E9; color:#2E7D32; }
        .status-abgelehnt  { background:#FFEBEE; color:#C62828; }