/* ======================= */
/* DB-Style Farben         */
/* ======================= */
:root {
    --db-red: #EC0016;
    --db-dark: #1d1d1f;
    --db-gray: #f5f5f5;
    --db-border: #e0e0e0;
    --sidebar-width: 220px;
    --sidebar-collapsed: 60px;
}

/* ======================= */
/* GLOBAL STYLES           */
/* ======================= */
* {
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family: "Segoe UI", Arial, sans-serif;
}
.hv-preview {
    width:100%;
    max-width:300px;
    border:1px solid #ccc;
    border-radius:4px;
    cursor:pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hv-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 25px rgba(0,0,0,0.2);
}
body {
    background: var(--db-gray);
    color: var(--db-dark);
    padding-top: 60px; /* Platz für den fixed Header */
}
#diproNotification{

position:fixed;
top:90px;
right:20px;

background:#e53935;
color:white;

padding:12px 18px;

font-weight:bold;

border-radius:6px;

box-shadow:0 4px 12px rgba(0,0,0,0.2);

display:none;

z-index:9999;

cursor:pointer;

}
#adminNotification{

position:fixed;
top:20px;
right:20px;

background:#ff9800;
color:white;

padding:12px 18px;

font-weight:bold;

border-radius:6px;

box-shadow:0 4px 12px rgba(0,0,0,0.2);

display:none;

z-index:9999;

}

/* ======================= */
/* AUTH (Login/Register)   */
/* ======================= */
.auth-container {
    background: white;
    padding:40px;
    width:100%;
    max-width:380px;
    border-radius:8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    border:1px solid var(--db-border);
    margin: 60px auto;
}

.logo {
    text-align:center;
    font-size:26px;
    font-weight:700;
    margin-bottom:30px;
    color: var(--db-red);
}

.input-group {
    margin-bottom:20px;
    position: relative;
}

.input-group label {
    display:block;
    font-size:14px;
    margin-bottom:6px;
}

.input-group input {
    width:100%;
    padding:12px;
    border-radius:4px;
    border:1px solid var(--db-border);
    outline:none;
    transition:0.2s;
}

.input-group input:focus {
    border-color: var(--db-red);
}

button {
    width:100%;
    padding:12px;
    border:none;
    border-radius:4px;
    background: var(--db-red);
    color:white;
    font-weight:600;
    cursor:pointer;
    transition:0.2s;
}

button:hover {
    background:#c40014;
    transform: translateY(-1px);
}

.link-text {
    margin-top:18px;
    text-align:center;
    font-size:14px;
}

.link-text a {
    color: var(--db-red);
    text-decoration:none;
}

.error {
    background:#ffe6e8;
    color:#a10010;
    padding:10px;
    border-radius:4px;
    margin-bottom:15px;
    text-align:center;
    border:1px solid #f5b5bb;
}

.success {
    background:#e6f7ff;
    color:#004466;
    padding:10px;
    border-radius:4px;
    margin-bottom:15px;
    text-align:center;
    border:1px solid #b3e0ff;
}

/* ======================= */
/* DASHBOARD / HEADER      */
/* ======================= */
.header {
    position: fixed;
    top:0;
    left:0;
    right:0;
    height: 60px;
    background: var(--db-red);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.header a {
    color:white;
    text-decoration:none;
    font-weight:500;
}

/* ======================= */
/* SIDEBAR                 */
/* ======================= */
.sidebar {
    position: fixed;
    top: 60px;
    left:0;
    bottom:0;
    width: var(--sidebar-width);
    background: white;
    border-right:1px solid var(--db-border);
    overflow-y:auto;
    transition: width 0.3s;
    box-shadow: 2px 0 8px rgba(0,0,0,0.05);
    z-index: 999;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar ul {
    list-style:none;
    padding:0;
    margin:0;
}

.sidebar li {
    display:flex;
    align-items:center;
    padding:15px 20px;
    cursor:pointer;
    transition: background 0.2s;
}

.sidebar li:hover {
    background: #f0f0f0;
}

.sidebar li i {
    margin-right:15px;
    font-size:18px;
    width:20px;
    text-align:center;
}

.sidebar.collapsed li span {
    display:none;
}

/* ======================= */
/* MAIN CONTENT            */
/* ======================= */
.main-content {
    margin-left: var(--sidebar-width); /* Platz für Sidebar */
    padding: 20px 30px;
    display: flex;
    flex-direction: column;
    gap: 20px; /* Abstand zwischen Cards */
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed);
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid var(--db-border);
    margin: 0;
}

.card h2 {
    margin-bottom:10px;
    color: var(--db-dark);
}

.card p {
    margin:0;
    color: var(--db-dark);
}

.card ul {
    padding-left: 20px;
}

.card ul li {
    margin-bottom:5px;
}

/* ======================= */
/* DASHBOARD CARDS         */
/* ======================= */
.dashboard-wrapper {
    display:flex;
    gap:60px;
    justify-content:center;
    flex-wrap: wrap;
}
.dashboard-card {
    flex: 1 1 180px;
    min-width: 180px;
    max-width: 220px;
    max-height: 240px; /* <-- fixiert die Höhe, damit Charts nicht endlos wachsen */
    display:flex;
    flex-direction: column;
    align-items:center;
    text-align:center;
    padding: 15px;
    gap:10px;
    overflow: hidden; /* Charts und Text bleiben innerhalb der Card */
}

.dashboard-card canvas {
    width: 100% !important;
    height: 180px !important;
    max-width: 180px;
}

.progress-ring {
    position: relative;
    width: 180px;
    height: 180px;
}



/* ======================= */
/* SEARCH / RESULTS        */
/* ======================= */
.result-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.result-item:hover {
    background: #f0f0f0;
    transform: translateY(-1px);
}

.address-results {
    position: absolute;
    background: #1e1e1e;
    width: 100%;
    border-radius: 8px;
    margin-top: 5px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 999;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.address-item {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.address-item:hover {
    background: #2c2c2c;
}

/* ======================= */
/* MODAL DETAIL            */
/* ======================= */
#detailModal {
    display:none;
    align-items:center;
    justify-content:center;
    background: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease forwards;
    z-index: 1001;
}

@keyframes fadeIn { from {opacity:0;} to {opacity:1;} }

.modal-content .card {
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-radius: 10px;
}

.status-active { color: #28a745; font-weight:600; }
.status-expired { color: #dc3545; font-weight:600; }
.status-done { color: #007bff; font-weight:600; }
.status-open { color: #ffc107; font-weight:600; }

/* ======================= */
/* RESPONSIVE              */
/* ======================= */
@media (max-width: 768px){
    .sidebar {
        left: -220px;
    }
    .sidebar.collapsed {
        left:0;
    }
    .main-content {
        margin-left:0;
    }

    .dashboard-wrapper {
        flex-direction: column;
        gap: 25px;
        align-items: center;
    }

    .dashboard-card {
        width: 90%;
        max-width: none;
    }

    .progress-ring {
        width: 150px !important;
        height: 150px !important;
    }

    .dashboard-card canvas {
        width: 100% !important;
        height: 150px !important;
        max-width: 150px;
    }
}

@media (max-width:480px){
    .auth-container{
        margin:15px;
        padding:25px;
    }
    .main-content{
        padding:15px;
    }
    .progress-ring {
        width: 130px !important;
        height: 130px !important;
    }
    .dashboard-card canvas {
        width: 100% !important;
        height: 130px !important;
        max-width: 130px;
    }
}
.online-badge {
    font-size:13px;
    font-weight:600;
    margin-left:8px;
}

.online {
    color:#00c853;
}

.offline {
    color:#999;
}
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.action-buttons form {
    margin: 0;
}

.btn-small {
    padding: 4px 10px;
    font-size: 13px;
    border-radius: 5px;
    border: 1px solid #ccc;
    background: #f5f5f5;
    cursor: pointer;
}

.btn-small:hover {
    background: #e5e5e5;
}

.btn-danger {
    border-color: #c0392b;
    color: #c0392b;
}

.btn-danger:hover {
    background: #c0392b;
    color: #fff;
}
