/* ================================================================
   ADMIN: PLANLEISTUNG v2.0.0
   Linear/Vercel-Inspired Plan Performance Column Configuration

   Datei: fe-auslastungsmonitor/assets/planleistung.css
   Wird von Dash automatisch geladen.

   DESIGN-SYSTEM:
   - Gleiche Sprache wie versandstellen.css (Glassmorphism, DM Sans)
   - Kaufland-Rot (#E1001A) als Accent statt Grün
   - Cards mit Left-Accent, Monospace-IDs, staggered Animationen
   - Dark/Light via CSS Custom Properties

   BREAKPOINTS:
     4K+      : 1600px+
     Desktop  : Standard → 3-spaltig
     Tablet   : ≤960px  → 2-spaltig
     Mobile   : ≤680px  → 1-spaltig
     Phone    : ≤420px  → Kompakt
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,700&family=JetBrains+Mono:wght@400;600&display=swap');


/* ================================================================
   DARK MODE (Default)
   ================================================================ */
:root {
    --pl-accent: #E1001A;
    --pl-accent-rgb: 225, 0, 26;
    --pl-accent-soft: rgba(225, 0, 26, 0.08);
    --pl-accent-glow: rgba(225, 0, 26, 0.15);

    --pl-bg-card: rgba(255, 255, 255, 0.02);
    --pl-bg-card-hover: rgba(255, 255, 255, 0.05);
    --pl-border: rgba(255, 255, 255, 0.06);
    --pl-border-hover: rgba(255, 255, 255, 0.10);

    --pl-text-primary: #f0f1f5;
    --pl-text-secondary: rgba(255, 255, 255, 0.55);
    --pl-text-muted: rgba(255, 255, 255, 0.25);

    --pl-shadow-card: 0 4px 24px rgba(0, 0, 0, 0.15);

    --pl-font: 'DM Sans', -apple-system, 'Segoe UI', system-ui, sans-serif;
    --pl-font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

    --pl-noise-opacity: 0.012;
}


/* ================================================================
   LIGHT MODE
   ================================================================ */
[data-mantine-color-scheme="light"] {
    --pl-bg-card: rgba(255, 255, 255, 0.6);
    --pl-bg-card-hover: rgba(255, 255, 255, 0.9);
    --pl-border: rgba(0, 0, 0, 0.06);
    --pl-border-hover: rgba(0, 0, 0, 0.10);

    --pl-text-primary: #0a0a0a;
    --pl-text-secondary: rgba(0, 0, 0, 0.5);
    --pl-text-muted: rgba(0, 0, 0, 0.25);

    --pl-accent-soft: rgba(225, 0, 26, 0.06);
    --pl-accent-glow: rgba(225, 0, 26, 0.08);
    --pl-shadow-card: 0 4px 24px rgba(0, 0, 0, 0.04);

    --pl-noise-opacity: 0.006;
}


/* ================================================================
   ANIMATIONS
   ================================================================ */
@keyframes plFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes plAccentPulse {
    0%, 100% { box-shadow: 0 0 4px 0 var(--pl-accent-glow); }
    50%      { box-shadow: 0 0 12px 2px var(--pl-accent-glow); }
}

@keyframes plShakeNo {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-4px); }
    40%      { transform: translateX(4px); }
    60%      { transform: translateX(-3px); }
    80%      { transform: translateX(2px); }
}


/* ================================================================
   PAGE
   ================================================================ */
.pl-page {
    font-family: var(--pl-font);
    padding-top: 48px;
    padding-bottom: 80px;
    min-height: 60vh;
    position: relative;
}

.pl-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    opacity: var(--pl-noise-opacity);
    pointer-events: none;
    z-index: 0;
}


/* ================================================================
   TOP BAR (Breadcrumb + Counter)
   ================================================================ */
.pl-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
    animation: plFadeUp 0.4s ease-out both;
}

.pl-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.pl-breadcrumb-link {
    color: var(--pl-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}
.pl-breadcrumb-link:hover {
    color: var(--pl-accent);
}

.pl-breadcrumb-sep {
    color: var(--pl-text-muted);
    opacity: 0.5;
}

.pl-breadcrumb-current {
    color: var(--pl-text-secondary);
}

.pl-counter {
    font-size: 13px;
}
.pl-counter-num {
    font-family: var(--pl-font-mono);
    font-weight: 600;
    color: var(--pl-accent);
}
.pl-counter-label {
    color: var(--pl-text-muted);
}


/* ================================================================
   PAGE HEADER
   ================================================================ */
.pl-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 32px;
    gap: 16px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
    animation: plFadeUp 0.4s ease-out 0.08s both;
}

.pl-page-title {
    font-family: var(--pl-font);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--pl-text-primary);
    margin: 0;
}

.pl-page-sub {
    font-size: 14px;
    color: var(--pl-text-muted);
    margin: 6px 0 0;
    max-width: 520px;
    line-height: 1.5;
}

.pl-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}


/* ================================================================
   BUTTONS (Back + Add)
   ================================================================ */
.pl-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--pl-border);
    background: var(--pl-bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--pl-text-secondary);
    font-size: 13px;
    font-family: var(--pl-font);
    cursor: pointer;
    transition: all 0.2s ease;
}
.pl-back-btn:hover {
    border-color: rgba(var(--pl-accent-rgb), 0.3);
    color: var(--pl-accent);
}

.pl-add-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 8px;
    border: none;
    background: var(--pl-accent);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--pl-font);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 2px 8px var(--pl-accent-glow);
}
.pl-add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--pl-accent-glow),
                0 0 0 3px rgba(var(--pl-accent-rgb), 0.08);
}
.pl-add-btn:active {
    transform: translateY(0);
}


/* ================================================================
   COLUMN CARDS GRID
   ================================================================ */
.pl-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    position: relative;
    z-index: 1;
}


/* ================================================================
   CARD
   ================================================================ */
.pl-card {
    position: relative;
    border-radius: 12px;
    border: 1px solid var(--pl-border);
    background: var(--pl-bg-card);
    backdrop-filter: blur(12px) saturate(1.1);
    -webkit-backdrop-filter: blur(12px) saturate(1.1);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    animation: plFadeUp 0.5s ease-out both;
}

/* Stagger Delays */
.pl-card-0  { animation-delay: 0.10s; }
.pl-card-1  { animation-delay: 0.14s; }
.pl-card-2  { animation-delay: 0.18s; }
.pl-card-3  { animation-delay: 0.22s; }
.pl-card-4  { animation-delay: 0.26s; }
.pl-card-5  { animation-delay: 0.30s; }
.pl-card-6  { animation-delay: 0.34s; }
.pl-card-7  { animation-delay: 0.38s; }
.pl-card-8  { animation-delay: 0.42s; }
.pl-card-9  { animation-delay: 0.46s; }
.pl-card-10 { animation-delay: 0.50s; }
.pl-card-11 { animation-delay: 0.54s; }

.pl-card:hover {
    background: var(--pl-bg-card-hover);
    border-color: var(--pl-border-hover);
    transform: translateY(-2px);
    box-shadow: var(--pl-shadow-card);
}


/* ================================================================
   CARD ACCENT LINE (left edge, Kaufland-Rot)
   ================================================================ */
.pl-card-accent {
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 3px;
    border-radius: 0 2px 2px 0;
    background: var(--pl-accent);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.pl-card:hover .pl-card-accent {
    opacity: 1;
    animation: plAccentPulse 3s ease-in-out infinite;
}


/* ================================================================
   CARD CONTENT
   ================================================================ */
.pl-card-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 20px 24px;
    gap: 12px;
}

.pl-card-info {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.pl-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--pl-accent-soft);
    border: 1px solid rgba(var(--pl-accent-rgb), 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}
.pl-card:hover .pl-card-icon {
    background: rgba(var(--pl-accent-rgb), 0.12);
    border-color: rgba(var(--pl-accent-rgb), 0.15);
    transform: scale(1.04);
}

.pl-card-title {
    font-family: var(--pl-font-mono);
    font-size: 15px;
    font-weight: 600;
    color: var(--pl-text-primary);
    letter-spacing: 0.01em;
}

.pl-card-meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
}

.pl-card-tag {
    font-size: 12px;
    color: var(--pl-text-secondary);
}

.pl-card-sep {
    font-size: 10px;
    color: var(--pl-text-muted);
    opacity: 0.6;
}

.pl-card-meta {
    font-size: 11px;
    color: var(--pl-text-muted);
    margin-top: 2px;
}


/* ================================================================
   CARD RIGHT: Delete Button
   ================================================================ */
.pl-card-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.pl-card-delete {
    opacity: 0.4;
    transition: opacity 0.2s ease, transform 0.2s ease !important;
}
.pl-card:hover .pl-card-delete {
    opacity: 1;
}
.pl-card-delete:hover {
    transform: scale(1.1);
}


/* ================================================================
   MODAL ICON (im Title)
   ================================================================ */
.pl-modal-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--pl-accent-soft);
    border: 1px solid rgba(var(--pl-accent-rgb), 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pl-modal-icon-danger {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.08);
}


/* ================================================================
   EMPTY STATE
   ================================================================ */
.pl-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 80px 20px;
    animation: plFadeUp 0.5s ease-out 0.2s both;
}

.pl-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--pl-bg-card);
    border: 1px solid var(--pl-border);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
}

.pl-empty-text {
    font-size: 15px;
    font-weight: 500;
    color: var(--pl-text-secondary);
    text-align: center;
}

.pl-empty-hint {
    font-size: 13px;
    color: var(--pl-text-muted);
    text-align: center;
    max-width: 360px;
    line-height: 1.5;
}


/* ================================================================
   RESPONSIVE — 4K+ (1600px+)
   ================================================================ */
@media (min-width: 1600px) {
    .pl-page { padding-top: 56px; }
    .pl-page-title { font-size: 32px; }
    .pl-grid { gap: 16px; }
    .pl-card-content { padding: 24px 24px 24px 28px; }
}


/* ================================================================
   RESPONSIVE — Tablet (≤960px)
   ================================================================ */
@media (max-width: 960px) {
    .pl-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .pl-page { padding-top: 36px; }
    .pl-page-title { font-size: 24px; }
}


/* ================================================================
   RESPONSIVE — Mobile (≤680px)
   ================================================================ */
@media (max-width: 680px) {
    .pl-grid {
        grid-template-columns: 1fr;
    }
    .pl-page { padding-top: 28px; padding-bottom: 48px; }
    .pl-page-title { font-size: 22px; }
    .pl-page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .pl-header-actions {
        width: 100%;
        justify-content: space-between;
    }
    .pl-top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}


/* ================================================================
   RESPONSIVE — Phone (≤420px)
   ================================================================ */
@media (max-width: 420px) {
    .pl-card-content { padding: 16px 14px 16px 20px; }
    .pl-card-icon { width: 36px; height: 36px; }
    .pl-card-title { font-size: 14px; }
    .pl-card-meta-row { display: none; }
    .pl-add-btn { padding: 8px 14px; font-size: 12px; }
}