/* === CSS extrahiert aus preisabweichungen.html (extrahiert 2026-04-26) === */
  @import url('/shared/fonts/inter.css');
  * { margin: 0; padding: 0; box-sizing: border-box; }

  :root {
    --bg: linear-gradient(145deg, #eef2f7 0%, #e4ecf4 25%, #dfe8f0 50%, #e8eef5 75%, #f0f4f8 100%);
    --nav-bg: rgba(255,255,255,0.55);
    --nav-border: rgba(255,255,255,0.5);
    --card-bg: rgba(255,255,255,0.45);
    --card-border: rgba(255,255,255,0.6);
    --card-hover-bg: rgba(255,255,255,0.65);
    --card-shadow: 0 2px 16px rgba(0,0,0,0.04);
    --card-hover-shadow: 0 12px 44px rgba(0,0,0,0.08);
    --text-primary: #1c1c1e;
    --text-secondary: #636366;
    --text-tertiary: #8e8e93;
    --badge-bg: rgba(4,179,214,0.1);
    --badge-color: #04b3d6;
    --toggle-bg: rgba(0,0,0,0.06);
    --toggle-knob: #fff;
    --input-bg: rgba(255,255,255,0.7);
    --modal-bg: rgba(255,255,255,0.85);
  }

  [data-theme="dark"] {
    --bg: linear-gradient(145deg, #1a1a2e 0%, #16213e 30%, #1a1a2e 60%, #0f3460 100%);
    --nav-bg: rgba(30,30,46,0.85);
    --nav-border: rgba(255,255,255,0.08);
    --card-bg: rgba(30,30,46,0.65);
    --card-border: rgba(255,255,255,0.08);
    --card-hover-bg: rgba(40,40,60,0.75);
    --card-shadow: 0 2px 16px rgba(0,0,0,0.2);
    --card-hover-shadow: 0 12px 44px rgba(0,0,0,0.3);
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1a6;
    --text-tertiary: #636366;
    --badge-bg: rgba(4,179,214,0.15);
    --badge-color: #2cc5e4;
    --toggle-bg: rgba(255,255,255,0.1);
    --toggle-knob: #1c1c1e;
    --input-bg: rgba(30,30,46,0.7);
    --modal-bg: rgba(30,30,46,0.92);
  }

  body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    min-height: 100vh;
    background: var(--bg);
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
    -webkit-font-smoothing: antialiased;
    transition: background 0.4s;
  }

  @keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }

  /* ===== NAV ===== */
  nav {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--nav-bg);
    backdrop-filter: blur(44px) saturate(180%);
    -webkit-backdrop-filter: blur(44px) saturate(180%);
    border-bottom: 1px solid var(--nav-border);
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.3s;
  }

  .nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex-shrink: 1;
    overflow: hidden;
  }
  .nav-logo { height: 28px; width: auto; display: block; }
  [data-theme="dark"] .nav-logo { filter: brightness(2.2) contrast(0.85); }

  .nav-back {
    font-size: 13px;
    font-weight: 500;
    color: var(--badge-color);
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 8px;
    transition: all 0.2s;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    min-height: 40px;
    display: flex;
    align-items: center;
  }
  .nav-back:hover { background: var(--badge-bg); }

  .nav-divider {
    width: 1px;
    height: 18px;
    background: var(--nav-border);
    flex-shrink: 0;
  }

  .nav-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    transition: color 0.3s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
  }

  .btn-chat-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 10px;
    border: 1px solid rgba(4,179,214,0.3);
    background: rgba(4,179,214,0.08);
    color: var(--badge-color);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
    min-height: 40px;
  }
  .btn-chat-nav:hover { background: rgba(4,179,214,0.18); }

  .theme-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    min-height: 40px;
    padding: 4px 0;
  }
  .toggle-icon { font-size: 14px; line-height: 1; }
  .toggle-track {
    width: 44px; height: 26px;
    border-radius: 13px;
    background: var(--toggle-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    position: relative;
    transition: all 0.3s;
  }
  .toggle-knob {
    width: 20px; height: 20px;
    border-radius: 10px;
    background: var(--toggle-knob);
    position: absolute;
    top: 2px; left: 3px;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  }
  [data-theme="dark"] .toggle-knob { left: 21px; background: #f5f5f7; }

  /* ===== CONTAINER ===== */
  .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 24px 80px;
  }

  /* ===== INFO-BOX ===== */
  .info-box{display:flex;gap:14px;align-items:flex-start;background:linear-gradient(135deg,rgba(4,179,214,0.08),rgba(4,179,214,0.01));border:1px solid var(--card-border);border-left:3px solid var(--badge-color);backdrop-filter:blur(20px);border-radius:14px;padding:14px 18px;margin-bottom:20px;box-shadow:0 2px 12px rgba(4,179,214,0.04)}
  .info-box-icon{flex-shrink:0;width:32px;height:32px;border-radius:10px;background:rgba(4,179,214,0.15);display:flex;align-items:center;justify-content:center;color:var(--badge-color)}
  .info-box-body{flex:1;min-width:0}
  .info-box-title{font-size:11px;font-weight:700;color:var(--badge-color);text-transform:uppercase;letter-spacing:.5px;margin-bottom:4px}
  .info-box-text{font-size:13px;color:var(--text-secondary);line-height:1.55}

  /* ===== STATS ===== */
  .stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
  }

  .stat-card {
    background: var(--card-bg);
    backdrop-filter: blur(60px) saturate(180%);
    -webkit-backdrop-filter: blur(60px) saturate(180%);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
    transition: background 0.3s, box-shadow 0.2s, border-color 0.2s, transform 0.15s;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
  }
  .stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, transparent 100%);
    border-radius: 16px 16px 0 0;
    pointer-events: none;
  }
  [data-theme="dark"] .stat-card::before {
    background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, transparent 100%);
  }
  .stat-card:hover { box-shadow: var(--card-hover-shadow); background: var(--card-hover-bg); }
  .stat-card:active { transform: scale(0.97); }
  .stat-card.active-filter {
    border-color: var(--badge-color);
    box-shadow: 0 0 0 2px rgba(4,179,214,0.25), var(--card-shadow);
  }

  .stat-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    transition: color 0.3s;
  }
  .stat-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -1px;
    line-height: 1;
    transition: color 0.3s;
  }
  .stat-value.blue  { color: var(--badge-color); }
  .stat-value.red   { color: #ff453a; }
  .stat-value.orange { color: #ff9f0a; }
  .stat-value.gray  { color: var(--text-tertiary); }
  .stat-hint {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 4px;
    transition: color 0.3s;
  }

  /* ===== TOOLBAR ===== */
  .toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
  }

  .btn-batch {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 11px;
    border: none;
    background: linear-gradient(135deg, #30d158, #25a244);
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 40px;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
  }
  .btn-batch:hover { opacity: 0.88; }
  .btn-batch:disabled { opacity: 0.5; cursor: not-allowed; }

  /* ===== FILTER BAR ===== */
  .filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
  }

  .filter-select {
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    min-height: 40px;
    cursor: pointer;
  }
  .filter-select:focus { border-color: var(--badge-color); }

  .filter-date {
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    min-height: 40px;
    cursor: pointer;
  }
  .filter-date:focus { border-color: var(--badge-color); }

  .filter-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
  }

  /* ===== HAUPT-KARTE ===== */
  .main-card {
    background: var(--card-bg);
    backdrop-filter: blur(60px) saturate(180%);
    -webkit-backdrop-filter: blur(60px) saturate(180%);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: background 0.3s;
    margin-bottom: 24px;
  }

  /* ===== TABELLE ===== */
  .tbl-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table.abw-tbl {
    width: auto;
    min-width: 960px;
    border-collapse: collapse;
    font-size: 13px;
  }

  .abw-tbl th {
    padding: 12px 14px;
    text-align: left;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 1px solid var(--card-border);
    white-space: nowrap;
    background: var(--card-bg);
    position: sticky;
    top: 0;
    z-index: 10;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s, background 0.3s;
    -webkit-tap-highlight-color: transparent;
  }
  .abw-tbl th:hover { color: var(--text-primary); }
  .abw-tbl th.sort-asc::after  { content: ' ↑'; color: var(--badge-color); }
  .abw-tbl th.sort-desc::after { content: ' ↓'; color: var(--badge-color); }
  .abw-tbl th.no-sort { cursor: default; }
  .abw-tbl th.no-sort:hover { color: var(--text-tertiary); }

  .abw-tbl td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--card-border);
    color: var(--text-primary);
    vertical-align: middle;
    transition: color 0.3s;
    white-space: nowrap;
  }
  .abw-tbl tr:last-child td { border-bottom: none; }
  .abw-tbl tbody tr {
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
  }
  .abw-tbl tbody tr:hover { background: rgba(4,179,214,0.04); }

  /* ===== AMPEL-DOT ===== */
  .ampel-dot {
    display: inline-block;
    width: 12px; height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
  }
  .ampel-dot.gruen  { background: #30d158; box-shadow: 0 0 5px rgba(48,209,88,0.5); }
  .ampel-dot.gelb   { background: #ff9f0a; box-shadow: 0 0 5px rgba(255,159,10,0.5); }
  .ampel-dot.rot    { background: #ff453a; box-shadow: 0 0 5px rgba(255,69,58,0.5); }

  /* ===== STATUS-BADGE ===== */
  .badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
  }
  .badge.offen {
    background: rgba(4,179,214,0.1);
    color: var(--badge-color);
    border: 1px solid rgba(4,179,214,0.25);
  }
  .badge.akzeptiert {
    background: rgba(48,209,88,0.12);
    color: #30d158;
    border: 1px solid rgba(48,209,88,0.3);
  }
  .badge.reklamiert {
    background: rgba(255,69,58,0.1);
    color: #ff453a;
    border: 1px solid rgba(255,69,58,0.25);
  }

  /* ===== ABWEICHUNG-WERT ===== */
  .abw-pos { color: #ff453a; font-weight: 600; }
  .abw-neg { color: #30d158; font-weight: 600; }
  .abw-neutral { color: var(--text-secondary); }

  /* ===== AKTIONS-BUTTONS ===== */
  .action-btns {
    display: flex;
    gap: 5px;
    align-items: center;
  }
  .btn-action {
    height: 34px;
    padding: 0 11px;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background: var(--toggle-bg);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    min-width: 40px;
    min-height: 40px;
    white-space: nowrap;
  }
  .btn-action.akzept  { border-color: rgba(48,209,88,0.35); color: #30d158; background: rgba(48,209,88,0.08); }
  .btn-action.akzept:hover { background: rgba(48,209,88,0.18); }
  .btn-action.reklam  { border-color: rgba(255,69,58,0.35); color: #ff453a; background: rgba(255,69,58,0.08); }
  .btn-action.reklam:hover { background: rgba(255,69,58,0.18); }
  .btn-action.notiz   { font-size: 15px; }
  .btn-action.notiz:hover { background: var(--card-hover-bg); color: var(--text-primary); }

  /* ===== NOTIZ-FELD ===== */
  .notiz-row td {
    padding: 0 14px 10px;
    background: rgba(4,179,214,0.03);
  }
  .notiz-inner {
    display: flex;
    gap: 8px;
    align-items: flex-end;
  }
  .notiz-textarea {
    flex: 1;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1.5px solid var(--badge-color);
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    min-height: 60px;
    transition: border-color 0.2s;
  }
  .btn-notiz-save {
    padding: 8px 14px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #04b3d6, #0090b0);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    min-height: 40px;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
  }
  .btn-notiz-save:hover { opacity: 0.88; }

  /* ===== LOADING / EMPTY ===== */
  .state-box {
    padding: 60px 20px;
    text-align: center;
  }
  .state-icon { font-size: 48px; margin-bottom: 12px; }
  .state-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    transition: color 0.3s;
  }
  .state-sub {
    font-size: 14px;
    color: var(--text-secondary);
    transition: color 0.3s;
  }

  .skeleton {
    background: linear-gradient(90deg, var(--toggle-bg) 25%, rgba(255,255,255,0.05) 50%, var(--toggle-bg) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: 6px;
  }
  @keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
  .skeleton-row { height: 46px; margin: 1px 0; border-radius: 0; }

  .spinner {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid var(--card-border);
    border-top-color: var(--badge-color);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
  }
  @keyframes spin { to { transform: rotate(360deg); } }

  /* ===== TOP-LIEFERANTEN ===== */
  .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
  }
  .section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s;
  }

  .top-lief-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    margin-bottom: 32px;
  }

  .top-lief-card {
    background: var(--card-bg);
    backdrop-filter: blur(60px) saturate(180%);
    -webkit-backdrop-filter: blur(60px) saturate(180%);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
    transition: background 0.3s, box-shadow 0.2s;
  }
  .top-lief-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, transparent 100%);
    border-radius: 16px 16px 0 0;
    pointer-events: none;
  }
  [data-theme="dark"] .top-lief-card::before {
    background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, transparent 100%);
  }

  .top-lief-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    transition: color 0.3s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .top-lief-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
  }
  .top-lief-label {
    font-size: 12px;
    color: var(--text-secondary);
    transition: color 0.3s;
  }
  .top-lief-val {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.3s;
  }
  .top-lief-val.red   { color: #ff453a; }
  .top-lief-val.orange { color: #ff9f0a; }

  .top-lief-bar-bg {
    height: 4px;
    background: var(--toggle-bg);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
  }
  .top-lief-bar {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, #ff9f0a, #ff453a);
    transition: width 0.6s ease;
  }

  /* ===== TOAST ===== */
  #toastContainer {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
  }
  .toast {
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 500;
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transform: translateX(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    max-width: 320px;
    pointer-events: all;
  }
  .toast.show { transform: translateX(0); opacity: 1; }
  .toast.success { background: rgba(48,209,88,0.9); color: #fff; }
  .toast.error   { background: rgba(255,69,58,0.9);  color: #fff; }
  .toast.info    { background: rgba(4,179,214,0.9);   color: #fff; }

  /* ===== MOBILE ===== */
  @media (max-width: 640px) {
    nav { padding: 0 16px; }
    .container { padding: 16px 12px 80px; }

    .stats-row {
      grid-template-columns: 1fr 1fr;
      gap: 8px;
    }
    .stat-value { font-size: 22px; }
    .stat-label { font-size: 10px; }

    .toolbar { flex-direction: column; align-items: stretch; }
    .btn-batch { justify-content: center; }

    .filter-bar { gap: 8px; }
    .filter-select, .filter-date { flex: 1; min-width: 0; }
    .filter-label { display: none; }

    .btn-chat-nav span { display: none; }

    .top-lief-grid { grid-template-columns: 1fr; }
  }


/* === Auto-generierte Klassen aus inline style="..." (preisabweichungen.html, 8 unique) === */
.s-2b2b73 { display:flex;align-items:center;min-height:40px;min-width:40px; }
.s-6a09a1 { display:flex;gap:8px;align-items:center;flex-wrap:wrap; }
.s-d12fd7 { font-size:13px;color:var(--text-secondary); }
.s-26dd46 { padding:0; }
.s-2dd439 { padding:8px; }
.s-93b8ea { display:none; }
.s-bcf5dd { grid-column:1/-1;padding:32px 0;text-align:center;color:var(--text-tertiary);font-size:14px; }
.s-67f938 { margin:0 auto 10px;width:20px;height:20px; }


/* === Auto-Klassen aus inline style="..." in preisabweichungen.js (5 unique) === */
.s-26dd46 { padding:0; }
.s-2dd439 { padding:8px; }
.s-539b04 { text-align:center; }
.s-93b8ea { display:none; }
.s-707c74 { grid-column:1/-1;padding:24px;text-align:center;color:var(--text-tertiary);font-size:14px; }
