﻿:root {
    --bg: #f5f9ff;
    --card: #ffffff;
    --muted: #6b7280;
    --accent: #2563eb;
    --blue-100: #dbeafe;
    --blue-200: #bfdbfe;
    --blue-300: #93c5fd;
    --red: #ef4444;
    --shadow: 0 6px 18px rgba(37, 99, 235, 0.08);
}

html,
body {
    height: 100%
}

body {
    background: var(--bg);
    color: var(--accent);
    font-family: Inter, Segoe UI, Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0
}

.min-h-screen {
    min-height: 100vh
}

.p-6 {
    padding: 1.5rem
}

.mb-6 {
    margin-bottom: 1.5rem
}

.flex {
    display: flex
}

.items-center {
    align-items: center
}

.justify-between {
    justify-content: space-between
}

.gap-4 {
    gap: 1rem
}

.rounded-xl {
    border-radius: 0.75rem
}

.rounded-lg {
    border-radius: 0.5rem
}

.shadow-sm {
    box-shadow: var(--shadow)
}

.card {
    background: var(--card);
    border-radius: .75rem;
    padding: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(37, 99, 235, 0.06)
}

.text-sm {
    font-size: .875rem
}

.muted {
    color: var(--muted);
}

.machine-card {
    background: var(--card);
    border: 1px solid rgba(37, 99, 235, 0.06);
    padding: 0.75rem;
    border-radius: .5rem;
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.04)
}

.machine-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .5rem
}

.led {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
    margin-right: .5rem
}

    .led.green {
        background: #16a34a;
        box-shadow: 0 0 6px rgba(22, 163, 74, 0.2)
    }

    .led.yellow {
        background: #f59e0b;
        box-shadow: 0 0 6px rgba(245, 158, 11, 0.15)
    }

    .led.red {
        background: #ef4444;
        box-shadow: 0 0 6px rgba(239, 68, 68, 0.15)
    }

.chip {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .6rem;
    border-radius: 999px;
    background: var(--blue-200);
    color: #05204a;
    border: 1px solid rgba(5, 32, 74, 0.06);
    cursor: grab
}

    .chip:hover {
        transform: translateY(-2px);
        transition: all .12s ease-in-out
    }

    .chip .name {
        font-size: 0.95rem
    }

.remove-btn {
    background: transparent;
    border: none;
    color: var(--red);
    cursor: pointer;
    padding-left: 8px
}

    .remove-btn:hover {
        color: #b91c1c
    }

.grid {
    display: grid;
    gap: 1rem
}

.grid-cols-1 {
    grid-template-columns: repeat(1, 1fr)
}

.md\:grid-cols-2 {
    grid-template-columns: repeat(2, 1fr)
}

.xl\:grid-cols-3 {
    grid-template-columns: repeat(3, 1fr)
}

@media(min-width:900px) {
    .grid-cols-1.md\:grid-cols-2.xl\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media(min-width:700px) {
    .grid-cols-1.md\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.tooltip {
    position: relative;
    display: inline-block
}

    .tooltip .tooltip-box {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        bottom: 130%;
        background: rgba(2, 6, 23, 0.9);
        color: white;
        padding: 6px 8px;
        border-radius: 6px;
        font-size: 0.8rem;
        white-space: nowrap;
        opacity: 0;
        pointer-events: none;
        transition: opacity .12s ease, transform .12s ease
    }

    .tooltip:hover .tooltip-box {
        opacity: 1;
        transform: translateX(-50%) translateY(-6px)
    }

.status-card {
    position: fixed;
    right: 12px;
    bottom: 12px;
    padding: 0.75rem;
    background: var(--card);
    border-radius: .5rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(37, 99, 235, 0.06)
}

.assigned-mini {
    background: #e5e7eb;
    color: #0b1220;
    border: 1px solid rgba(2, 6, 23, 0.04)
}


.assign-count {
    font-size: 0.8rem;
    color: #0b1220;
    margin-left: 6px
}

.assign-count-alert {
    background-color: #fecaca;
    /* stärkeres rot */
    border: 1px solid #f87171;
    color: #7f1d1d;
    padding: 2px 8px;
    border-radius: 8px;
    font-weight: 700;
}


.machine-special {
    border: 2px solid #f7c948 !important;
    box-shadow: 0 0 8px rgba(247, 201, 72, 0.6);
}

.cap-btn {
    background: #e8e8e8;
    border: 1px solid #c8c8c8;
    border-radius: 4px;
    padding: 2px 6px;
    cursor: pointer;
    font-size: 0.85rem;
}

    .cap-btn:hover {
        background: #dcdcdc;
    }


/* Grundlayout */
.chip {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
}

    /* Unassigned (0x zugewiesen) → HELLBLAU */
    .chip.unassigned {
        background-color: #e7f1ff !important;
        border-color: #cfe2ff !important;
    }

    /* Mehrfachzugewiesen → GELB */
    .chip.assigned-mini {
        background-color: #fff3cd !important;
        border-color: #ffecb5 !important;
    }

    /* Externe Personen (IsForeign) — lila Darstellung */
    .chip.foreign {
        background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
        color: #ffffff;
        border: 1px solid #6d28d9;
        box-shadow: 0 2px 6px rgba(124,58,237,0.18);
    }
    .chip.foreign .name {
        color: #f8fafc;
    }

.shift-tabs {
    background: white;
    padding: 10px 12px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}


.save-button {
    background: linear-gradient(135deg, var(--accent), #2563eb);
    color: black !important;
    padding: 1rem 1.8rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 1.1rem;
    font-weight: 700;
    display: inline-flex;
    gap: 0.6rem;
    align-items: center;
    letter-spacing: 0.4px;
    transition: 0.2s ease;
}

    .save-button svg {
        stroke: black !important;
    }

    .save-button:hover {
        border-color: #2563eb;
        /* blau wie dein accent */
    }


.date-picker-field {
    background: white;
    border: 1px solid #d1d5db;
    /* hellgrau wie deine UI */
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.95rem;
    color: #0f172a;
    /* dunkles Blau/Grau */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: all .15s ease-in-out;
}

    .date-picker-field:hover {
        border-color: #2563eb;
        /* blau wie dein accent */
    }

    .date-picker-field:focus {
        outline: none;
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
    }
