/* ================================================================
   ADMIN: PALETTENTYPEN v3.0.0
   State-of-the-Art Glassmorphism · Kaufland Dark Theme

   Datei: fe-auslastungsmonitor/assets/palettentypen.css
   Wird von Dash automatisch geladen.
   ================================================================ */

/* Fonts via versandstellen.css bereits geladen — kein Re-Import nötig */


/* ================================================================
   CSS CUSTOM PROPERTIES
   ================================================================ */
:root {
    /* Kaufland Brand */
    --pt-accent:        #E00000;
    --pt-accent-rgb:    224, 0, 0;
    --pt-accent-glow:   rgba(224, 0, 0, 0.25);
    --pt-accent-subtle: rgba(224, 0, 0, 0.08);

    /* Status: Grün */
    --pt-green:         #10b981;
    --pt-green-rgb:     16, 185, 129;
    --pt-green-glow:    rgba(16, 185, 129, 0.18);
    --pt-green-subtle:  rgba(16, 185, 129, 0.08);

    /* Backgrounds */
    --pt-bg-page:        #1a1a1a;
    --pt-bg-card:        rgba(255, 255, 255, 0.03);
    --pt-bg-card-active: rgba(255, 255, 255, 0.055);
    --pt-bg-card-hover:  rgba(255, 255, 255, 0.075);

    /* Borders */
    --pt-border:        rgba(255, 255, 255, 0.07);
    --pt-border-active: rgba(255, 255, 255, 0.12);
    --pt-border-red:    rgba(224, 0, 0, 0.18);

    /* Typography */
    --pt-text-primary:   #f0f1f5;
    --pt-text-secondary: rgba(255, 255, 255, 0.55);
    --pt-text-muted:     rgba(255, 255, 255, 0.28);

    /* Shadows */
    --pt-shadow-card:    0 2px 8px rgba(0, 0, 0, 0.25);
    --pt-shadow-active:  0 4px 24px rgba(0, 0, 0, 0.35),
                         0 0 0 1px rgba(255, 255, 255, 0.06);
    --pt-shadow-hover:   0 8px 32px rgba(0, 0, 0, 0.45),
                         0 0 0 1px rgba(255, 255, 255, 0.09);

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

    --pt-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-mantine-color-scheme="light"] {
    --pt-bg-page:        #f4f4f6;
    --pt-bg-card:        rgba(255, 255, 255, 0.65);
    --pt-bg-card-active: rgba(255, 255, 255, 0.9);
    --pt-bg-card-hover:  rgba(255, 255, 255, 0.95);
    --pt-border:         rgba(0, 0, 0, 0.07);
    --pt-border-active:  rgba(0, 0, 0, 0.11);
    --pt-text-primary:   #0d0d0d;
    --pt-text-secondary: rgba(0, 0, 0, 0.5);
    --pt-text-muted:     rgba(0, 0, 0, 0.28);
    --pt-shadow-card:    0 2px 8px rgba(0, 0, 0, 0.06);
    --pt-shadow-active:  0 4px 16px rgba(0, 0, 0, 0.1);
    --pt-shadow-hover:   0 8px 24px rgba(0, 0, 0, 0.12);
    --pt-green-glow:     rgba(16, 185, 129, 0.12);
    --pt-green-subtle:   rgba(16, 185, 129, 0.06);
}


/* ================================================================
   ANIMATIONS
   ================================================================ */

@keyframes ptFadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes ptAccentPulse {
    0%, 100% { opacity: 0.7; box-shadow: 0 0 6px 0 var(--pt-green-glow); }
    50%      { opacity: 1;   box-shadow: 0 0 18px 3px var(--pt-green-glow); }
}

@keyframes ptDotPulse {
    0%   { transform: scale(1);   box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
    50%  { transform: scale(1.1); box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
    100% { transform: scale(1);   box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

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


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

.pt-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: 0.012;
    pointer-events: none;
    z-index: 0;
}


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

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

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

.pt-bc-sep     { color: var(--pt-text-muted); opacity: 0.4; }
.pt-bc-current { color: var(--pt-text-secondary); }

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


/* ================================================================
   PAGE HEADER
   ================================================================ */
.pt-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 16px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
    animation: ptFadeUp 0.4s var(--pt-ease) 0.08s both;
}

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

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

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


/* ================================================================
   STATUS / PROGRESS BAR
   ================================================================ */
.pt-progress-wrapper {
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
    animation: ptBarReveal 0.5s var(--pt-ease) 0.15s both;
}

.pt-status-bar {
    background: var(--pt-bg-card);
    border: 1px solid var(--pt-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 12px;
    padding: 16px 20px;
}

.pt-bar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.pt-bar-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--pt-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.pt-bar-count         { font-family: var(--pt-font-mono); font-size: 13px; }
.pt-bar-count-active  { font-weight: 700; font-size: 15px; }
.pt-bar-count-total   { color: var(--pt-text-muted); font-size: 13px; }

.pt-bar-track {
    position: relative;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.pt-bar-ticks {
    position: relative;
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    padding: 0 1px;
}

.pt-bar-tick {
    width: 1px;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 1px;
}


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


/* ================================================================
   CARD BASE
   ================================================================ */
.pt-card {
    position: relative;
    border-radius: 14px;
    border: 1px solid var(--pt-border);
    background: var(--pt-bg-card);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    overflow: hidden;
    box-shadow: var(--pt-shadow-card);
    transition:
        transform    0.3s var(--pt-ease),
        box-shadow   0.3s var(--pt-ease),
        border-color 0.3s ease,
        background   0.3s ease,
        opacity      0.3s ease;
    animation: ptFadeUp 0.5s var(--pt-ease) both;
}

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

.pt-card:hover {
    transform:    translateY(-3px) scale(1.012);
    box-shadow:   var(--pt-shadow-hover);
    border-color: var(--pt-border-active);
    background:   var(--pt-bg-card-hover);
}

.pt-card-active {
    background:   var(--pt-bg-card-active);
    border-color: var(--pt-border-active);
    box-shadow:   var(--pt-shadow-active);
}

.pt-card-inactive         { opacity: 0.6; }
.pt-card-inactive:hover   { opacity: 1; }


/* ================================================================
   LEFT ACCENT STRIPE
   ================================================================ */
.pt-card-accent {
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 3px;
    border-radius: 0 2px 2px 0;
    background: transparent;
    transition: all 0.35s ease;
}

.pt-card-active .pt-card-accent {
    background: var(--pt-green);
    animation: ptAccentPulse 3s ease-in-out infinite;
}


/* ================================================================
   CARD CONTENT
   ================================================================ */
.pt-card-content {
    padding: 18px 18px 16px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pt-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pt-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.pt-card-active .pt-card-icon,
.pt-icon-active {
    background:   var(--pt-accent-subtle) !important;
    border-color: var(--pt-border-red) !important;
}

.pt-card-name {
    font-family: var(--pt-font);
    font-size: 14px;
    font-weight: 600;
    color: var(--pt-text-primary);
    letter-spacing: -0.01em;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pt-card-meta {
    font-family: var(--pt-font-mono);
    font-size: 11px;
    color: var(--pt-text-muted);
    margin-top: 3px;
    letter-spacing: 0.02em;
}


/* ================================================================
   PULSING GLOW DOT
   ================================================================ */
.pt-pulse-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--pt-green);
    flex-shrink: 0;
    animation: ptDotPulse 2.2s ease-in-out infinite;
    transition: opacity 0.3s ease;
}

.pt-dot-hidden {
    background: rgba(255, 255, 255, 0.12);
    animation: none;
    opacity: 0.4;
}


/* ================================================================
   BOTTOM ROW
   ================================================================ */
.pt-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.045);
}

.pt-card-status {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 3px 9px;
    border-radius: 5px;
    transition: all 0.25s ease;
}

.pt-status-active  { color: var(--pt-green); background: var(--pt-green-subtle); }
.pt-status-inactive { color: var(--pt-text-muted); background: transparent; }

/* Mantine Switch: Kaufland-Rot */
.pt-toggle .mantine-Switch-track {
    border-color: var(--pt-border) !important;
    transition: background 0.2s, border-color 0.2s !important;
}
.pt-toggle .mantine-Switch-track[data-checked] {
    background:   var(--pt-accent) !important;
    border-color: var(--pt-accent) !important;
    box-shadow:   0 0 8px rgba(var(--pt-accent-rgb), 0.4);
}


/* ================================================================
   EMPTY STATE
   ================================================================ */
.pt-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 80px 20px;
    grid-column: 1 / -1;
    animation: ptFadeUp 0.5s var(--pt-ease) 0.2s both;
}

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

.pt-empty-text {
    font-size: 14px;
    color: var(--pt-text-secondary);
}


/* ================================================================
   RESPONSIVE — 4K+
   ================================================================ */
@media (min-width: 1600px) {
    .pt-page         { padding-top: 56px; }
    .pt-page-title   { font-size: 32px; }
    .pt-grid         { gap: 16px; }
    .pt-card-content { padding: 22px 22px 18px 26px; }
    .pt-card-icon    { width: 46px; height: 46px; }
}


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


/* ================================================================
   RESPONSIVE — Mobile (≤ 680px)
   ================================================================ */
@media (max-width: 680px) {
    .pt-grid { grid-template-columns: 1fr; }

    .pt-page {
        padding-top:    28px;
        padding-bottom: 48px;
    }

    .pt-page-title { font-size: 22px; }

    .pt-page-header {
        flex-direction: column;
        align-items:    flex-start;
    }

    .pt-top-bar {
        flex-direction: column;
        align-items:    flex-start;
        gap:            12px;
    }
}


/* ================================================================
   RESPONSIVE — Phone (≤ 420px)
   ================================================================ */
@media (max-width: 420px) {
    .pt-card-content { padding: 14px 14px 12px 18px; }
    .pt-card-icon    { width: 36px; height: 36px; border-radius: 9px; }
    .pt-card-name    { font-size: 13px; }
    .pt-card-status  { display: none; }
    .pt-bar-label    { display: none; }
}