/* ================================================================
   ADMIN: VERSANDSTELLEN v2.0.0
   Linear/Vercel-Inspired Shipping Point Configuration

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

@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 {
    --vs-accent: #E1001A;
    --vs-accent-rgb: 225, 0, 26;
    --vs-green: #10b981;
    --vs-green-rgb: 16, 185, 129;
    --vs-green-glow: rgba(16, 185, 129, 0.15);

    --vs-bg-card: rgba(255, 255, 255, 0.02);
    --vs-bg-card-active: rgba(255, 255, 255, 0.035);
    --vs-bg-card-hover: rgba(255, 255, 255, 0.05);
    --vs-border: rgba(255, 255, 255, 0.06);
    --vs-border-active: rgba(255, 255, 255, 0.08);

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

    --vs-shadow-active: 0 4px 24px rgba(0, 0, 0, 0.15);

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

    --vs-noise-opacity: 0.012;
}


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

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

    --vs-green-glow: rgba(16, 185, 129, 0.08);
    --vs-shadow-active: 0 4px 24px rgba(0, 0, 0, 0.04);

    --vs-noise-opacity: 0.006;
}


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

@keyframes vsAccentGlow {
    0%, 100% { box-shadow: 0 0 4px 0 var(--vs-green-glow); }
    50%      { box-shadow: 0 0 12px 2px var(--vs-green-glow); }
}


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

.vs-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(--vs-noise-opacity);
    pointer-events: none;
    z-index: 0;
}


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

.vs-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}
.vs-breadcrumb-link {
    color: var(--vs-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}
.vs-breadcrumb-link:hover { color: var(--vs-accent); }
.vs-breadcrumb-sep {
    color: var(--vs-text-muted);
    opacity: 0.5;
}
.vs-breadcrumb-current {
    color: var(--vs-text-secondary);
}

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


/* ================================================================
   PAGE HEADER
   ================================================================ */
.vs-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: vsFadeUp 0.4s ease-out 0.08s both;
}

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

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

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


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


/* ================================================================
   SHIPPING POINT CARD
   ================================================================ */
.vs-card {
    position: relative;
    border-radius: 12px;
    border: 1px solid var(--vs-border);
    background: var(--vs-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: vsFadeUp 0.5s ease-out both;
}

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

.vs-card:hover {
    background: var(--vs-bg-card-hover);
    transform: translateY(-2px);
}

/* Active card */
.vs-card-active {
    background: var(--vs-bg-card-active);
    border-color: var(--vs-border-active);
    box-shadow: var(--vs-shadow-active);
}

/* Inactive card — slightly transparent */
.vs-card-inactive {
    opacity: 0.65;
}
.vs-card-inactive:hover {
    opacity: 1;
}


/* ================================================================
   GREEN ACCENT LINE (left edge)
   ================================================================ */
.vs-card-accent {
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 3px;
    border-radius: 0 2px 2px 0;
    background: transparent;
    transition: all 0.3s ease;
}

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


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

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

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

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

.vs-card-name {
    font-size: 12px;
    color: var(--vs-text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}


/* ================================================================
   RIGHT SIDE: Status + Toggle
   ================================================================ */
.vs-card-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.vs-card-status-label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 8px;
    border-radius: 4px;
}

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

/* Override Mantine Switch Track für Kaufland-Rot */
.vs-toggle .mantine-Switch-track {
    border-color: var(--vs-border) !important;
}
.vs-toggle .mantine-Switch-track[data-checked] {
    background: var(--vs-accent) !important;
    border-color: var(--vs-accent) !important;
}


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

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

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


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


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


/* ================================================================
   RESPONSIVE — Mobile (≤680px)
   ================================================================ */
@media (max-width: 680px) {
    .vs-grid {
        grid-template-columns: 1fr;
    }
    .vs-page { padding-top: 28px; padding-bottom: 48px; }
    .vs-page-title { font-size: 22px; }
    .vs-page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .vs-top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .vs-card-name { max-width: 140px; }
}


/* ================================================================
   RESPONSIVE — Phone (≤420px)
   ================================================================ */
@media (max-width: 420px) {
    .vs-card-content { padding: 16px 14px 16px 20px; }
    .vs-card-icon { width: 36px; height: 36px; }
    .vs-card-nr { font-size: 14px; }
    .vs-card-status-label { display: none; }
}
