*{
    box-sizing:border-box;
}


body{

    margin:0;

    background:#f5f5f5;

    color:#111;

    font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;

}



a{

    text-decoration:none;

    color:inherit;

}



button{

    border:none;

    height:55px;

    border-radius:15px;

    background:#111;

    color:white;

    font-size:16px;

    cursor:pointer;

    padding:0 25px;

}



/* ======================
   LOGIN
====================== */


.login-page{

    min-height:100vh;

    display:flex;

    align-items:center;

    justify-content:center;

    padding:20px;

}



.login-box{

    width:100%;

    max-width:380px;

    background:white;

    padding:40px 30px;

    border-radius:30px;

    box-shadow:
    0 20px 50px rgba(0,0,0,.08);

    text-align:center;

}



.login-box h1{

    letter-spacing:5px;

    margin-bottom:5px;

}



.login-box p{

    color:#777;

    margin-bottom:30px;

}



.login-box input{


    width:100%;

    height:55px;

    margin-bottom:15px;

    border-radius:15px;

    border:1px solid #ddd;

    padding:0 18px;

    font-size:16px;


}





/* ======================
   EMPLOYEE
====================== */



.employee-container{


    max-width:600px;

    margin:auto;

    padding:20px;


}



.employee-top{


    background:#111;

    color:white;

    padding:25px;

    border-radius:25px;

}



.employee-top h1{

    margin:0;

    letter-spacing:4px;

}



.employee-card,

.employee-report{


    background:white;

    margin-top:20px;

    padding:25px;

    border-radius:25px;


}





.employee-card label,

.employee-report label{


    display:block;

    margin-top:15px;

    margin-bottom:7px;

    color:#555;


}



.employee-card input,

.employee-report input,

.employee-report textarea{


    width:100%;

    min-height:50px;

    border-radius:14px;

    border:1px solid #ddd;

    padding:12px;

    font-size:16px;


}



.employee-report textarea{

    height:90px;

    resize:none;

}



.logout{


    display:block;

    text-align:center;

    margin-top:25px;

    padding:15px;

    background:#111;

    color:white;

    border-radius:15px;


}




/* ======================
   ADMIN
====================== */


.admin-container{


    max-width:1200px;

    margin:auto;

    padding:25px;


}





.admin-header{


    background:#111;

    color:white;

    padding:30px;

    border-radius:30px;

    display:flex;

    justify-content:space-between;

    align-items:center;


}





.admin-header h1{

    margin:0;

    letter-spacing:4px;

}





.logout-admin{

    display:inline-block;

    background:white;

    color:#111;

    padding:14px 22px;

    border-radius:14px;

    font-weight:600;

}



.logout-admin:hover{

    background:#ddd;

}





.dashboard{


    display:grid;

    grid-template-columns:repeat(4,1fr);

    gap:20px;

    margin-top:25px;


}





.stat-card{


    background:white;

    padding:25px;

    border-radius:25px;


}



.stat-card h3{

    margin-top:0;

    color:#666;

}



.stat-card strong{


    display:block;

    font-size:35px;

    margin-top:10px;


}





.employees{


    display:grid;

    grid-template-columns:repeat(3,1fr);

    gap:20px;


}





.employee-card{


    background:white;

    padding:25px;

    border-radius:25px;


}



.employee-card p{

    margin:10px 0;

}





.filter{


    background:white;

    padding:25px;

    border-radius:25px;

    display:flex;

    gap:15px;

    margin-bottom:25px;


}





.filter input{


    height:50px;

    border-radius:12px;

    border:1px solid #ddd;

    padding:10px;


}





.filter a{


    display:flex;

    align-items:center;

    justify-content:center;

    padding:0 18px;

    min-height:50px;

    border-radius:12px;

    background:#111;

    color:white;

    white-space:nowrap;

}





.filter button{

    width:auto;

}





.reports{


    display:grid;

    grid-template-columns:repeat(2,1fr);

    gap:20px;


}





.report-card{


    background:white;

    padding:25px;

    border-radius:25px;

    overflow:hidden;

}



.report-card h3{

    margin-top:0;

}



.report-card p{

    margin:8px 0;

    line-height:1.5;

    word-break:break-word;

}



.report-card hr{

    border:none;

    height:1px;

    background:#e6e6e6;

    margin:18px 0;

}





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


@media(max-width:800px){



.dashboard{


    grid-template-columns:1fr;


}



.employees{


    grid-template-columns:1fr;


}



.reports{


    grid-template-columns:1fr;


}




.admin-container{

    padding:15px;

}



.admin-header{


    flex-direction:column;

    gap:20px;

    align-items:stretch;


}




.logout-admin{

    width:100%;

    text-align:center;

}




.filter{


    flex-direction:column;

    gap:12px;


}




.filter form{

    width:100%;

}



.filter input{

    width:100%;

}



.filter button{

    width:100%;

}



.filter a{

    width:100%;

}





}



@media(max-width:450px){



.dashboard{


    grid-template-columns:1fr;


}



.login-box{


    padding:30px 20px;


}




.admin-container{

    padding:12px;

}



.admin-header{

    padding:20px;

}



.admin-header h1{

    font-size:24px;

}



h2{

    font-size:22px;

}



.stat-card strong{

    font-size:28px;

}



.report-card{

    padding:18px;

}



.employee-card{

    padding:18px;

}



.filter{

    padding:18px;

}



}
/* Учёт времени и возвратов */
.dashboard { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.period-table-card { margin: 25px 0; }
.table-scroll { overflow-x: auto; }
.period-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
.period-table th, .period-table td { padding: 14px 12px; border-bottom: 1px solid #e6e6e6; white-space: nowrap; }
.period-table thead th { background: #f5f5f5; }
.period-table th:first-child { position: sticky; left: 0; background: white; z-index: 1; }
.period-table thead th:first-child { background: #f5f5f5; }
.period-total { font-weight: 700; }
.time-late { color: #a33131; }
.time-overtime { color: #237242; }
.muted, .period-help { color: #666; font-size: 14px; line-height: 1.6; }
.period-help { margin: 16px 0; }
.error-message { background: #fff0f0; color: #a33131; padding: 18px; border-radius: 14px; margin: 20px 0; }
@media (max-width: 800px) {
    .dashboard { grid-template-columns: 1fr; }
    .period-table th, .period-table td { padding: 12px 9px; }
}
