.sidebar{
    color:#fff;
    position:fixed;
    top:0;
    left:0;
    width:250px;
    height:100vh;
    cursor: pointer;

    background:#1c2939;
    box-shadow:2px 0 15px rgba(0,0,0,.08);

    padding:24px 18px;

    overflow-y:auto;
    overflow-x:hidden;

    scrollbar-width:thin;
    scrollbar-color:#4b5d75 transparent;

    transition:left .3s ease;
}

.sidebar::-webkit-scrollbar{
    width:6px;
}

.sidebar::-webkit-scrollbar-thumb{
    background:#4b5d75;
    border-radius:20px;
}

.sidebar h2{
    margin-bottom:25px;
    font-size:22px;
}

.sidebar ul{
    list-style:none;
    padding:0;
    margin:0;
}

.sidebar li{
    padding:12px 14px;
    margin-bottom:6px;
    border-radius:10px;
}

.sidebar li:hover{
    background:#366bd4;
}

.sidebar li.active{
    background:#366bd4;
}

.submenu li.active{
    background:#366bd4;
}

.sidebar li:focus,
.sidebar li:focus-visible{
    outline:none;
    background:transparent;
}

.sidebar li.active:focus,
.sidebar li.active:focus-visible{
    background:#366bd4;
}

.content{
    margin-left:280px;
    padding:40px;
}

.submenu{
    list-style:none;
    margin:8px 0 12px 18px;
    padding-left:12px;
    border-left:2px solid rgba(255,255,255,.15);
}

.submenu li{
    position:relative;
    padding:10px 12px;
    margin-bottom:4px;
    border-radius:10px;
    color:#c9d3df;
    font-size:14px;
    font-weight:500;
    cursor:pointer;
    transition:all .25s ease;
}

.submenu li::before{
    content:"";
    position:absolute;
    left:-14px;
    top:50%;
    transform:translateY(-50%);
    width:3px;
    height:0;
    background:#5b8cff;
    border-radius:20px;
    transition:.25s;
}

.submenu li:hover{
    background:rgba(91,140,255,.15);
    color:#fff;
    padding-left:18px;
}

.submenu li:hover::before{
    height:22px;
}

.submenu li.active{
    background:linear-gradient(90deg,#366bd4,#4d7ff0);
    color:#fff;
    font-weight:600;
    box-shadow:0 6px 14px rgba(54,107,212,.25);
}

.submenu li.active::before{
    height:24px;
    background:#fff;
}


/* Tablet */

@media (max-width:1024px){
    .cards,
    .assets,
    .renters,
    .tasks{
        grid-template-columns:repeat(2,1fr);
    }

    .object-logo{
        display: none;
    }

    .dashboard-row{
        flex-direction:column;
    }

    .revenue-chart,
    .asset-chart{
        width:100%;
    }

}

/* Smartphone */


@media (max-width:768px){
    #loginPage{
        display:flex;
        flex-direction:column;
        justify-content:center;
        align-items:center;
        min-height:100vh;
        padding:25px;
        background:#faf9f6;
    }

    .object-logo{
        display: none;
    }

    .loginBox{
        width:100%;
        max-width:380px;
        background:#fff;
        padding:30px 25px;
        border-radius:14px;
        border:1px solid #eef2f7;
        box-shadow:0 10px 30px rgba(0,0,0,.06);
    }

    .loginBox h1{
        font-size:28px;
        text-align:center;
        margin-bottom:8px;
    }

    .loginBox p{
        text-align:center;
        color:#666;
        margin-bottom:25px;
    }

    .loginBox input{
        width:100%;
        height:50px;
        padding:0 15px;
        margin-bottom:15px;
        font-size:16px;
        border:1px solid #d8dde6;
        border-radius:10px;
    }

    .loginBox input:focus{
        outline:none;
        border-color:#366bd4;
    }

    .loginBox button{
        width:100%;
        height:50px;
        border:none;
        border-radius:10px;
        background:linear-gradient(135deg,#243447,#1C2939);
        color:#fff;
        font-size:16px;
        font-weight:600;
        cursor:pointer;
        margin-top:5px;
    }

    .loginBox button:active{
        transform:scale(.98);
    }

    #error{
        margin-top:15px;
        text-align:center;
        color:#c94f4f;
    }

    html,
    body{
        width:100%;
        overflow-x:hidden;
    }

    *{
        box-sizing:border-box;
    }

    /* Menü */

    .mobile-menu-btn{
        display:flex;
        position:fixed;
        top:15px;
        left:15px;
        width:48px;
        height:48px;
        border:none;
        border-radius:10px;
        background:#1c2939;
        color:#fff;
        font-size:24px;
        justify-content:center;
        align-items:center;
        cursor:pointer;
        z-index:9999;
    }

    /* Sidebar */

    .sidebar{
        position:fixed;
        top:0;
        left:-260px;
        width:250px;
        height:100vh;
        transition:left .3s ease;
        z-index:9998;
    }

    .sidebar.open{
        left:0;
    }

    /* Seiten */

    .page{
        margin:0;
        margin-left:0!important;
        width:100%;
        padding:80px 15px 30px;
    }

    /* Überschriften */

    h1{
        font-size:28px;
    }

    h2{
        font-size:22px;
    }

    h3{
        font-size:16px;
    }

    /* Dashboard */

    .cards{
        display:grid;
        grid-template-columns:1fr;
        gap:15px;
    }

    .card{
        width:100%;
        padding:18px;
    }

    /* Dashboard Diagramme */

    .dashboard-row{
        display:flex;
        flex-direction:column;
        gap:20px;
    }

    .revenue-chart,
    .asset-chart{
        width:100%;
        max-width:100%;
        height:auto;
        margin-top:0;
    }

    .tasks{
        display:grid;
        grid-template-columns:1fr;
        gap:15px;
    }

    /* Canvas */

    canvas{
        width:100%!important;
        height:auto!important;
    }

    /* Suchleisten */

    .actionBar{
        display:flex;
        flex-direction:column;
        gap:12px;
    }

    .actionBar input,
    .actionBar button{
        width:100%;
        height:48px;
    }

    /* Formulare */

    .propertyFormBox,
    .renterFormBox,
    .taskFormBox{

        width:100%;
        padding:20px;
        border-radius:12px;
    }

    .propertyFormBox input,
    .propertyFormBox select,
    .renterFormBox input,
    .renterFormBox select,
    .taskFormBox input,
    .taskFormBox select{

        width:100%;
        margin-bottom:12px;
        height:48px;
    }

    .propertyFormBox button,
    .renterFormBox button,
    .taskFormBox button{

        width:100%;
        margin-top:10px;
    }

    /* Tabellen ausblenden */

    .property-overview-bar {
        display: none !important;
    }
    .renter-overview-bar{
        display:none !important;
    }
    .task-overview-bar{
        display:none !important;
    }

    /* Immobilien */

    .property-card{
        display:flex !important;
        flex-direction:column;

        width:100%;
        padding:18px;
        margin-top:16px;

        background:#fff;

        border:1px solid #eef2f7;
        border-radius:14px;

        gap:14px;
    }


    .property-img{
        width:100%;
        height:190px;
        object-fit:cover;
        border-radius:12px;
        margin:0;
    }
    .property-card p{
        display:flex;
        justify-content:space-between;
        align-items:center;

        margin:0;
        padding:10px 0;

        border-bottom:1px solid #eef2f7;
    }

    .property-card > *{
        width:100%;
    }

    .property-card h3{
        margin:0;
        font-size:20px;
    }

    .property-card p:last-of-type{
        border-bottom:none;
    }

    /* Mieter */

    .renter-card{
        display:flex  !important;
        flex-direction:column;

        grid-template-columns:1fr;

        gap:14px;

        padding:18px;

        margin-top:16px;

        background:#fff;

        border:1px solid #eef2f7;

        border-radius:12px;
    }

    .renter-card > *{
        width:100%;
    }

    .renter-user{
        display:flex;
        align-items:center;
        gap:4px;
    }

    .renter-user-info h3{
        margin:0;
        font-size:17px;
    }

    .renter-user-info span{
        color:#667085;
        font-size:14px;
    }

    .renter-property{
        display:flex;
        flex-direction:column;
        gap:4px;
    }

    .renter-card p{

        margin:0;

        padding:10px 0;

        border-bottom:1px solid #f2f4f7;
    }

    .status-paid,
    .status-open{

        width:fit-content;

        padding:8px 14px;
    }


    /* Aktionen */

    .property-actions,
    .renter-actions,
    .task-actions{
        display:flex;
        justify-content:flex-end;
        gap:10px;
        margin-top:10px;
    }

    .property-actions button{
        flex:1;
        height:46px;
        border-radius:10px;
    }

    .action-btn-status{
        width:fit-content;
        padding:0;
        border:none;
        background:none;
    }

    .action-btn-status p{
        display:inline-flex;
        justify-content:center;
        align-items:center;

        padding:8px 16px;
        height:auto;

        border:none;
        border-radius:999px;

        background:#ebf8ee;
        color:#16a34a;
        font-weight:600;
    }

    .renter-actions button{

        flex:1;

        height:46px;

        border-radius:10px;
    }

    .task-actions button{

        flex:1;

        height:46px;

        border-radius:10px;
    }

    .task-card button{
        flex:1;

        height:46px;

        border-radius:10px;
    }


    .rental-link{

        width:fit-content;

        margin-top:8px;
    }


    /* Action Buttons */

    .action-btn-pay,
    .action-btn-edit,
    .action-btn-delete{

        width:44px;

        height:44px;

        padding:0;

        border-radius:10px;
    }

    .btn-icon{

        width:22px;

        height:22px;
    }

    /* Aufgaben */

    .task{

        display:flex;

        align-items:flex-start;

        gap:12px;

        padding:15px;

        border-radius:10px;
    }

    .task-info{

        width:100%;
    }

    /* Kontakte */

    .contact-card{

        width:100%;
    }

    /* Alle festen Breiten entfernen */

    .revenue-chart,
    .asset-chart,
    .property-card,
    .renter-card,
    .contact-card,
    .card{

        max-width:100%;
    }

    .asset-header{
        display:flex;
        flex-direction:column;
        align-items:flex-start;
        gap:15px;
    }

    .asset-total{
        order:-1;
        width:100%;
        text-align:left;
        padding:12px 0;
        border-bottom:1px solid #eef2f7;
        margin-bottom:5px;
    }

    .asset-total span{
        display:block;
        font-size:13px;
        color:#667085;
        margin-bottom:4px;
    }

    .asset-total h2{
        margin:0;
        font-size:28px;
        font-weight:700;
    }

    .actionBar{
        width:100%;
    }

    .actionBar .small-btn{
        width:100%;
    }

    html,
    body{
        width:100%;
        max-width:100%;
        overflow-x:hidden;
    }

    .page,
    .content,
    .dashboard-row,
    .cards,
    .assets,
    .renters,
    .revenue-chart,
    .asset-chart,
    .tasks,
    .property-card,
    .renter-card,
    .contact-card,
    .object-rent,
    .finance-overview,
    .expense-overview{
        width:100% !important;
        max-width:100% !important;
        min-width:0 !important;
        margin-left:0 !important;
        margin-right:0 !important;
    }

    .actionBar{
        display:flex;
        flex-direction:column;
        gap:12px;
    }

    .actionBar input,
    .actionBar button{
        width:100%;
    }

    /* Alle Grids auf eine Spalte */

    .cards,
    .assets,
    .renters,
    .tasks,
    .dashboard-row{
        display:grid;
        grid-template-columns:1fr !important;
    }

    /* Alle Flexboxen umbrechen */

    .actionBar,
    .property-actions,
    .renter-actions{
        flex-wrap:wrap;
    }

    /* Charts */

    .revenue-chart,
    .asset-chart{
        overflow:hidden;
    }

    canvas{
        display:block;
        width:100% !important;
        max-width:100% !important;
    }

    /* Tabellen */

    .renter-card,
    .property-card{
        display:flex;
        flex-direction:column;
    }

    /* Bilder */

    img{
        display:block;
        max-width:100%;
        height:auto;
    }

    .task-overview-bar{
        display:none !important;
    }

    .tasks{
        display:grid;
        grid-template-columns:1fr;
        gap:15px;
    }

    .task-card{
        display:flex !important;
        flex-direction:column;

        width:100%;

        padding:18px;

        margin-top:16px;

        background:#fff;

        border:1px solid #eef2f7;
        border-radius:14px;

        gap:14px;
    }

    .task-card>*{
        width:100%;
    }

    .task-card h3{
        font-size:18px;
        margin:0;
    }

    .task-card p{
        display:flex;
        justify-content:space-between;
        align-items:center;

        padding:10px 0;
        margin:0;

        border-bottom:1px solid #eef2f7;
        font-size:14px;
    }

    .task-card p:last-child{
        border-bottom:none;
    }

    .task-action-btn-edit,
    .task-action-btn-property,
    .task-action-btn-delete{
        width:46px;
        height:46px;
        border-radius:10px;
        background:#f8fafc;
        border:1px solid #e5e7eb;
    }

    .task-action-btn-edit:hover,
    .task-action-btn-delete:hover{
        transform:none;
        background:#eef4ff;
    }

    .btn-icon{
        width:22px;
        height:22px;
    }

    .task-title{
        gap:12px;
    }

    .task-overview-card-icon{
        width:48px;
        height:48px;
    }

    .task-icon{
        width:48px;
        height:48px;
        padding:10px;
    }

    .task-avatar{
        width:38px;
        height:38px;
        line-height:38px;
        border-radius:50%;
        font-size:15px;
        font-weight:600;
    }

    .task span{
        font-size:26px;
    }

    .task{
        width:100%;
        padding:18px;
        border-radius:14px;
    }

    .property-investment-box{

        padding:20px;

        border-radius:15px;

    }


    .property-investment-header{

        padding-bottom:20px;

    }


    .property-investment-header h3{

        font-size:19px;

    }


    .property-investment-header p{

        font-size:12px;

    }


    .property-metric-section{

        padding:20px 0;

    }


    .property-metrics{

        grid-template-columns:1fr 1fr;

        gap:10px;

    }


    .property-metric{

        min-height:75px;

        padding:14px;

    }


    .property-metric strong{

        font-size:16px;

    }
}