*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: #f0f2f5;
    color: #1a1a2e;
    min-height: 100vh;
}

/* ── HEADER ── */
header {
    background-color: #1a1a2e;
    color: #ffffff;
    padding: 0 1.5rem;
    height: 60px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

header .logo {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

header .logo span {
    color: #e8a020;
}

/* ── LOGOUT BUTTON ── */
.btn-logout {
    margin-left: auto;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #ffffff;
    text-decoration: none;
    padding: 0.35rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    transition: background-color 0.2s, border-color 0.2s;
}

.btn-logout:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ── STATUS BADGE ── */
.status {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: right;
}

.status-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Online-Badge – per CSS ein-/ausblendbar */
.status.online {
    color: #4caf7d;
    /* display: none; */
    /* ← auskommentieren zum Ausblenden */
}

.status.online .status-dot {
    background-color: #4caf7d;
    box-shadow: 0 0 0 3px rgba(76, 175, 125, 0.25);
}

/* Offline-Badge – standardmäßig ausgeblendet */
.status.offline {
    color: #e05c5c;
    display: none;
    /* ← entfernen zum Einblenden */
}

.status.offline .status-dot {
    background-color: #e05c5c;
    box-shadow: 0 0 0 3px rgba(224, 92, 92, 0.25);
}

/* ── MAIN CONTAINER ── */
.container {
    max-width: 724px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* ── INFOTEXT ── */
.info-box {
    background: #ffffff;
    border-left: 4px solid #e8a020;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.75rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    font-size: 0.95rem;
    line-height: 1.6;
    color: #444;
}

.info-box strong {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 1rem;
    color: #1a1a2e;
}

/* ── TEXTFELD "LAUFENDE TASKS" ── */
.tasks-section {
    margin-top: 24px;
    margin-bottom: 2rem;
}

.tasks-section label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: #1a1a2e;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.tasks-section textarea {
    width: 100%;
    min-height: 280px;
    padding: 0.75rem 1rem;
    border: 1px solid #cdd1da;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    color: #1a1a2e;
    background: #ffffff;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.tasks-section textarea:focus {
    outline: none;
}

.tasks-section textarea[readonly] {
    background: #f5f6f8;
    color: #555;
    cursor: default;
    resize: none;
}

/* ── ZIEL-BUTTONS ── */
.section-title {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #1a1a2e;
    margin-bottom: 0.75rem;
}

.btn-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
}

.btn-ziel {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    gap: 0.6rem;
    width: 100%;
    padding: 1.1rem 1.5rem;
    background-color: #1a1a2e;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.btn-ziel:hover {
    background-color: #2c2c4e;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}

.btn-ziel:active {
    transform: scale(0.98);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.btn-ziel .icon {
    font-size: 1.05rem;
    flex-shrink: 0;
}

/* Aktiver Zustand – Roboter verfügbar */
.btn-ziel.active {
    gap: 24px;
}

.btn-ziel.active>span {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    gap: 8px;
}

.btn-ziel.active .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: auto;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background-color: rgba(255, 255, 255, 0.08);
    color: #4caf7d;
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
    white-space: nowrap;
}

.btn-ziel.active .status-badge::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #4caf7d;
    animation: pulse 1.4s ease-in-out infinite;
}

/* Inaktiver Zustand – Roboter im Einsatz */
.btn-ziel.inactive {
    background-color: #3a3a3a;
    color: #888888;
    cursor: not-allowed;
    box-shadow: none;
    pointer-events: none;
    opacity: 0.7;
    gap: 24px;
}

.btn-ziel.inactive .icon {
    opacity: 0.5;
}

.btn-ziel.inactive>span {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    gap: 8px;
}

.btn-ziel .status-badge {
    display: none;
}

.btn-ziel.inactive .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: auto;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background-color: rgba(255, 255, 255, 0.08);
    color: #aaaaaa;
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
    white-space: nowrap;
}

.btn-ziel.inactive .status-badge::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #e8a020;
    animation: pulse 1.4s ease-in-out infinite;
}

/* Offline-Variante – roter blinkender Punkt */
.btn-ziel.inactive.offline .status-badge::before {
    background-color: #e05c5c;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* Akzentfarbe für einzelne Buttons */
.btn-ziel.accent {
    background-color: #e8a020;
    color: #1a1a2e;
}

.btn-ziel.accent:hover {
    background-color: #cf8c10;
}

/* ── RESPONSIVE ── */
@media (min-width: 480px) {
    .btn-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 479px) {
    header .logo {
        font-size: 1rem;
    }
}

/* ── CONFIRM MODAL ── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.55);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.is-visible {
    display: flex;
}

.modal-box {
    background: #ffffff;
    border-radius: 10px;
    padding: 2rem 1.75rem 1.5rem;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.75rem;
}

.modal-title-warn {
    color: #c0392b;
}

.modal-text {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.modal-btn {
    padding: 0.55rem 1.4rem;
    border: none;
    border-radius: 6px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.modal-btn:active {
    transform: scale(0.97);
}

.modal-btn-no {
    background-color: #e8e8ec;
    color: #1a1a2e;
}

.modal-btn-no:hover {
    background-color: #d5d5db;
}

.modal-btn-yes {
    background-color: #1a1a2e;
    color: #ffffff;
}

.modal-btn-yes:hover {
    background-color: #2c2c4e;
}