@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; -webkit-tap-highlight-color: transparent; }

body {
    background-color: #0a0a0f; color: #e0e0e0; min-height: 100vh;
    padding: env(safe-area-inset-top) 30px 30px 30px; 
    overflow-x: hidden;
}

.screen { display: none; width: 100%; max-width: 1400px; margin: 0 auto; animation: fadeIn 0.3s ease; }
.screen.active { display: block; }

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

/* Inputs & Buttons (Sauberer, moderner) */
input[type="email"], input[type="password"], input[type="text"], input[type="date"], select {
    width: 100%; padding: 12px 16px; margin-bottom: 20px; border-radius: 8px;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); 
    color: #fff; outline: none; transition: 0.2s; font-size: 15px; 
}
select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 15px center; background-size: 14px; cursor: pointer; }
select option { background: #14141e; color: #fff; }
input:focus, select:focus { border-color: #00ff88; background: rgba(0, 255, 136, 0.03); }

button { width: 100%; padding: 12px; border-radius: 8px; border: none; font-weight: 600; font-size: 15px; cursor: pointer; transition: 0.2s; }
.btn-primary { background: #00ff88; color: #000; }
.btn-primary:active { transform: scale(0.98); }

.login-box { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); padding: 40px; border-radius: 16px; text-align: center; max-width: 380px; margin: 15vh auto; box-shadow: 0 10px 40px rgba(0,0,0,0.3); }
.login-box h2 { color: #fff; margin-bottom: 5px; font-weight: 600; }
.login-box p { color: #888; font-size: 0.9rem; margin-bottom: 30px; }
.error-msg { color: #ff4d4d; margin-top: 15px; font-size: 0.9rem; }

/* Dashboard Header */
.dashboard-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 20px; margin-bottom: 20px; }
.dashboard-header h1 { font-size: 1.6rem; font-weight: 600; color: #fff; }
.dashboard-header p { color: #888; font-size: 0.85rem; margin-top: 2px; }
.btn-icon { width: 40px; height: 40px; border-radius: 8px; background: rgba(255,255,255,0.05); color: #fff; font-size: 1.1rem; padding: 0; border: 1px solid rgba(255,255,255,0.05); }
.btn-icon:hover { background: rgba(255,255,255,0.1); }

/* Kanban Board Layout (Desktop) */
.board-container { display: flex; gap: 24px; overflow-x: auto; padding-bottom: 20px; align-items: flex-start; scroll-snap-type: x mandatory; }
.board-container::-webkit-scrollbar { height: 6px; }
.board-container::-webkit-scrollbar-track { background: transparent; }
.board-container::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }

.category-col { flex: 0 0 340px; background: rgba(255,255,255,0.01); border-radius: 12px; padding: 12px; scroll-snap-align: start; display: flex; flex-direction: column; }
.cat-header { padding: 10px 15px; margin-bottom: 12px; font-weight: 500; color: #aaa; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center; }
.cat-header::before { content: ''; display: inline-block; width: 8px; height: 8px; background: #00ff88; border-radius: 50%; margin-right: 10px; opacity: 0.7; }
.domain-list { min-height: 100px; display: flex; flex-direction: column; gap: 12px; }

/* Drag & Drop */
.sortable-ghost { opacity: 0.4; background: rgba(0, 255, 136, 0.05); border: 1px dashed #00ff88 !important; border-radius: 12px; }
.sortable-drag { cursor: grabbing !important; box-shadow: 0 15px 30px rgba(0,0,0,0.5) !important; transform: scale(1.02); }

/* Cards (Desktop aufgeräumt) */
.domain-card { background: #121217; border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; cursor: grab; transition: 0.2s; }
.domain-card:hover { border-color: rgba(255,255,255,0.15); }
.domain-card:active { cursor: grabbing; }

.card-img-wrapper { position: relative; height: 110px; border-bottom: 1px solid rgba(255,255,255,0.03); }
.card-img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; opacity: 0.8; }
.visibility-badge { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,0.8); padding: 4px 8px; border-radius: 6px; font-size: 0.7rem; color: #fff; font-weight: 500; }

.card-content { padding: 16px; pointer-events: none; }
.card-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.status-badge { font-size: 0.65rem; font-weight: 700; padding: 3px 6px; border-radius: 4px; letter-spacing: 0.5px; }
.status-online { background: rgba(0, 255, 136, 0.1); color: #00ff88; }
.status-offline { background: rgba(255, 77, 77, 0.1); color: #ff4d4d; }

.card-title { font-size: 1.05rem; font-weight: 600; color: #fff; margin-bottom: 4px; }
.card-domain { font-family: 'Courier New', Courier, monospace; font-size: 0.8rem; color: #00ff88; margin-bottom: 10px; }
.card-subtitle { font-size: 0.85rem; color: #888; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.card-actions { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: rgba(0,0,0,0.2); border-top: 1px solid rgba(255,255,255,0.02); }
.action-btns button { width: auto; padding: 6px 12px; font-size: 0.9rem; background: rgba(255,255,255,0.05); color: #ccc; border-radius: 6px; margin-right: 6px; border: 1px solid transparent; }
.action-btns button:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* Toggle Switch */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(255,255,255,0.15); transition: .3s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .3s; border-radius: 50%; }
input:checked + .slider { background-color: #00ff88; }
input:checked + .slider:before { transform: translateX(20px); }

.fab { position: fixed; bottom: 30px; right: 30px; width: 56px; height: 56px; border-radius: 50%; background: #00ff88; color: #000; font-size: 2rem; display: flex; justify-content: center; align-items: center; box-shadow: 0 8px 20px rgba(0,255,136,0.3); z-index: 100; cursor: pointer; border: none; }

/* Modal */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 1000; display: none; justify-content: center; align-items: center; }
.modal-overlay.active { display: flex; animation: fadeInModal 0.2s; }
.modal-card { background: #121217; width: 100%; max-width: 480px; border-radius: 16px; padding: 30px; border: 1px solid rgba(255,255,255,0.05); box-shadow: 0 20px 50px rgba(0,0,0,0.5); max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.modal-header h3 { font-weight: 600; font-size: 1.2rem; }
.btn-close { width: 32px; height: 32px; background: rgba(255,255,255,0.05); color: #fff; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; padding: 0; }
.modal-body label { display: block; font-size: 0.85rem; color: #888; margin-bottom: 6px; margin-top: 15px; }
.switches-container { background: rgba(255,255,255,0.02); border-radius: 8px; margin: 20px 0; padding: 5px 15px; border: 1px solid rgba(255,255,255,0.03); }
.switch-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; }
.switch-row label { margin: 0; color: #ddd; font-size: 0.95rem; }
@keyframes fadeInModal { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }


/* =========================================
   MOBILE STRICT VIEW (Die pure Reduktion)
   ========================================= */
@media (max-width: 768px) {
    body { padding: 20px 15px; }
    
    /* Alles Unnötige restlos ausblenden */
    .desktop-only, 
    .fab, 
    .card-img-wrapper, 
    .card-meta, 
    .card-subtitle, 
    .action-btns,
    .cat-header {
        display: none !important;
    }

    /* Board wird zur vertikalen, nahtlosen Liste */
    .board-container {
        flex-direction: column;
        gap: 12px;
        padding-bottom: 20px;
        overflow-x: hidden;
    }
    .category-col {
        flex: none;
        width: 100%;
        background: transparent;
        border: none;
        padding: 0;
    }
    .domain-list {
        gap: 12px;
        min-height: auto;
    }

    /* Die Karte wird extrem minimalistisch (Nur Flex-Row) */
    .domain-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 16px;
        background: #14141a;
        border: 1px solid rgba(255,255,255,0.04);
        border-radius: 12px;
        /* Drag&Drop auf Mobile unterbinden, damit man beim Scrollen nichts kaputt macht */
        pointer-events: none; 
    }

    /* Schalter wieder klickbar machen */
    .domain-card .switch {
        pointer-events: auto; 
    }

    .card-content {
        padding: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .card-title {
        font-size: 1.1rem;
        margin-bottom: 2px;
    }

    .card-domain {
        font-family: inherit;
        font-size: 0.85rem;
        color: #888;
        margin: 0;
        background: none;
        padding: 0;
    }

    .card-actions {
        background: none;
        padding: 0;
        border: none;
        margin-left: 15px;
    }
    
    /* Login & Modal auf Mobile anpassen */
    .login-box { margin: 10vh auto; padding: 25px; }
    .modal-overlay { align-items: flex-end; }
    .modal-card { border-radius: 20px 20px 0 0; border: none; }
}