/* ================================================
   🌐 BASIS
================================================ */

*{
 box-sizing:border-box;
}

body{
 margin:0;
 font-family:Arial, sans-serif;
 background: linear-gradient(#e8dccb, #d6c3a3);
 color:#222;
}


/* ================================================
   🔐 LOGIN FIX
================================================ */

body.login-page .login-box{
 width:100%;
 max-width:420px;
 background:#fff;
 padding:40px;
 border-radius:12px;
 box-shadow:0 10px 30px rgba(0,0,0,.08);
}

body.login-page input{
 width:48%;
 display:inline-block;
 margin-right:2%;
}

body.login-page input:last-child{
 margin-right:0;
}

body.login-page button{
 width:100%;
 margin-top:10px;
}


/* ================================================
   📦 APP CONTAINER
================================================ */

.box{
 width:95%;
 max-width:1300px;
 margin:30px auto;
 background:#fff;
 padding:30px;
 border-radius:12px;
 box-shadow:0 6px 20px rgba(0,0,0,.08);
}


/* ================================================
   🔘 BUTTONS
================================================ */

button{
 padding:10px 16px;
 border:none;
 border-radius:6px;
 background:#0066cc;
 color:#fff;
 cursor:pointer;
}

button:hover{
 background:#0052a3;
}

.btn{
 display:inline-block;
 padding:8px 14px;
 border-radius:6px;
 text-decoration:none;
 background:#0066cc;
 color:#fff;
}

.btn:hover{
 background:#0052a3;
}


/* ================================================
   🧾 KASSE TABELLE
================================================ */

.kasse{
 width:100%;
 border-collapse:collapse;
 margin-top:20px;
 table-layout:fixed;
}

.kasse th{
 text-align:left;
 font-weight:600;
 padding:10px 8px;
 border-bottom:2px solid #ccc;
}

.kasse td{
 padding:12px 8px;
 vertical-align:top;
 border-bottom:1px solid #e5e5e5;
}

.kasse tr:hover{
 background:#f8fbff;
}

/* feste Breiten */
.kasse th:nth-child(1),
.kasse td:nth-child(1){ width:80px; }

.kasse th:nth-child(2),
.kasse td:nth-child(2){ width:60px; }

.kasse th:nth-child(3),
.kasse td:nth-child(3){ width:110px; }

.kasse th:nth-child(4),
.kasse td:nth-child(4){ width:260px; }

.kasse th:nth-child(5),
.kasse td:nth-child(5){ width:140px; }

.kasse th:nth-child(6),
.kasse td:nth-child(6){ width:140px; }

.kasse th:nth-child(7),
.kasse td:nth-child(7),
.kasse th:nth-child(8),
.kasse td:nth-child(8){
 width:110px;
 text-align:right;
}

.kasse select{
 width:100%;
}


/* ================================================
   📈 DASHBOARD CARDS
================================================ */

.stats{
 display:flex;
 gap:20px;
 flex-wrap:wrap;
 margin-top:25px;
}

.card{
 flex:1;
 min-width:260px;
 padding:25px;
 border-radius:12px;
 background:#f5f7fb;
 box-shadow:0 4px 15px rgba(0,0,0,.05);
}

.card h3{
 margin:0 0 10px 0;
 font-size:18px;
}

.card p{
 margin:0;
 font-size:26px;
 font-weight:bold;
}

.card.kontostand{ background:#e8f0ff; }
.card.ein{ background:#eaf7ec; }
.card.aus{ background:#fdeaea; }


/* ================================================
   🧭 TOP NAVIGATION (NEU & STABIL)
================================================ */


.topnav{
 position:sticky;
 top:0;

 background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)),
             url('header-org.jpg') !important;

 background-size: cover !important;
 background-position: center !important;
 background-repeat: no-repeat !important;

 color:#fff;
 padding:20px 25px;
 display:flex;
 align-items:center;
 gap:25px;
 z-index:1000;
}






/* KEIN flex:1 mehr hier */
.nav-left{
 display:flex;
 align-items:center;
 gap:15px;
}

.nav-center{
 display:flex;
 align-items:center;
 gap:18px;
 flex:1;
 justify-content:center;
}

.nav-right{
 display:flex;
 align-items:center;
 gap:15px;
}

/* LOGO KLEIN & FIXIERT */
.nav-logo{
 height:60px;
 width:auto;
 display:block;
 flex-shrink:0;
}

.nav-center a{
 color:#fff;
 text-decoration:none;
 padding:6px 8px;
 position:relative;
}

.nav-center a.active::after{
 content:"";
 position:absolute;
 bottom:-5px;
 left:0;
 width:100%;
 height:3px;
 background:#fff;
}

.saldo{
 padding:6px 12px;
 border-radius:8px;
 font-weight:bold;
}

.saldo.plus{ background:#1a8f2a; }
.saldo.minus{ background:#c0392b; }

.logout{
 background:#c0392b !important;
 padding:6px 10px;
 border-radius:6px;
 color:#fff;
 text-decoration:none;
}


/* ================================================
   🧱 DASHBOARD LAYOUT
================================================ */

.dashboard-layout{
 display:flex;
}

.dashboard-sidebar{
 width:240px;
 flex-shrink:0;
 background:#eef1f5;
 padding:25px 20px;
 min-height:calc(100vh - 60px);
 border-right:1px solid #ddd;
}

.dashboard-content{
 flex:1;
 padding:30px;
}


/* ================================================
   📂 SIDEBAR LINKS
================================================ */

.dashboard-sidebar h4{
    margin-top:0;
    margin-bottom:18px;
    font-size:16px;
    color:#444;
}

.side-link{
    display:block;
    padding:10px 12px;
    margin-bottom:10px;
    border-radius:6px;
    text-decoration:none;
    background:#ffffff;
    color:#333;
    font-size:14px;
    border:1px solid #ddd;
    transition:.2s;
}

.side-link:hover{
    background:#0066cc;
    color:#fff;
    border-color:#0066cc;
}




/* ================================================
   🌙 DARK MODE
================================================ */

body.darkmode{
 background:#121212;
 color:#eee;
}

body.darkmode .box{
 background:#1e1e1e;
}

body.darkmode .topnav{
 background:#111;
}


/* ================================================
   📱 MOBILE
================================================ */

@media(max-width:800px){

 .dashboard-layout{
  flex-direction:column;
 }

 .dashboard-sidebar{
  width:100%;
  min-height:auto;
  border-right:none;
 }

 .dashboard-content{
  padding:15px;
 }

 .stats{
  flex-direction:column;
 }

}