/* ================= GLOBAL ================= */
html, body{
    height:100%;
    margin:0;
    font-family:'Segoe UI', Arial, sans-serif;
    background:#f4f6f9;
}

/* ================= TOPBAR ================= */
.topbar{
    height:60px;
    background:linear-gradient(to right,#001f3f,#8B0000);
    color:white;
    padding:0 25px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    box-shadow:0 2px 10px rgba(0,0,0,0.1);
    position:fixed;
    top:0;
    left:0;
    right:0;
    z-index:1000;
}

/* TOGGLE BUTTON */
.toggle-btn{
    cursor:pointer;
    border:0;
    background:rgba(255,255,255,0.12);
    color:white;
    border-radius:6px;
    padding:7px 10px;
    font-weight:700;
}

.notification-menu{
    position:relative;
}

.admin-top-actions{
    display:flex;
    align-items:center;
    gap:12px;
}

.notification-button{
    border:0;
    display:flex;
    align-items:center;
    gap:8px;
    min-height:38px;
    background:white;
    color:#061a33;
    border:1px solid rgba(255,255,255,0.35);
    border-radius:999px;
    padding:8px 13px;
    font-weight:800;
    box-shadow:0 8px 18px rgba(0,0,0,0.16);
    cursor:pointer;
}

.notification-button b{
    min-width:24px;
    height:24px;
    display:grid;
    place-items:center;
    background:#8B0000;
    color:white;
    border-radius:999px;
    font-size:12px;
}

.notification-count{
    position:absolute;
    top:-7px;
    right:-7px;
    min-width:20px;
    min-height:20px;
    display:grid;
    place-items:center;
    background:#dc3545;
    color:white;
    font-size:11px;
    border-radius:50%;
    border:2px solid #8B0000;
}

.notification-panel{
    position:absolute;
    top:calc(100% + 10px);
    right:0;
    width:320px;
    display:none;
    background:white;
    color:#172033;
    border-radius:8px;
    box-shadow:0 18px 42px rgba(0,0,0,0.22);
    border:1px solid #e5e7eb;
    overflow:hidden;
    z-index:1200;
}

.employee-checkin-link,
.admin-user-pill{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:38px;
    padding:8px 13px;
    border-radius:999px;
    font-weight:800;
}

.employee-checkin-link{
    color:white;
    text-decoration:none;
    background:rgba(255,255,255,0.12);
    border:1px solid rgba(255,255,255,0.22);
}

.employee-checkin-link:hover{
    color:#ffd15c;
}

.admin-user-pill{
    background:#ffd15c;
    color:#061a33;
}

.notification-panel.open{
    display:block;
}

.notification-panel strong{
    display:block;
    padding:12px 14px;
    background:#f8fafc;
    color:#001f3f;
    border-bottom:1px solid #e5e7eb;
}

.notification-panel a{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:12px 14px;
    color:#172033;
    text-decoration:none;
    border-bottom:1px solid #eef2f7;
}

.notification-panel a:hover{
    background:#f8fafc;
}

.notification-panel b{
    min-width:28px;
    text-align:center;
    color:white;
    background:#8B0000;
    border-radius:999px;
    padding:3px 8px;
}

/* ================= SIDEBAR ================= */
.sidebar{
    width:230px;
    height:calc(100vh - 60px);
    position:fixed;
    top:60px;
    left:0;
    background:#0a1f44;
    padding-top:15px;
    overflow-y:auto;
    transition:0.3s;
}

/* COLLAPSED SIDEBAR */
.sidebar.collapsed{
    width:70px;
}

.sidebar.collapsed a span{
    display:none;
}

.sidebar.collapsed .menu-title{
    display:none;
}

.sidebar.collapsed a{
    justify-content:center;
}

/* SCROLLBAR */
.sidebar::-webkit-scrollbar{
    width:6px;
}
.sidebar::-webkit-scrollbar-thumb{
    background:#8B0000;
    border-radius:10px;
}

/* SIDEBAR LINKS */
.sidebar a{
    display:flex;
    align-items:center;
    gap:8px;
    color:white;
    padding:12px 20px;
    text-decoration:none;
    font-size:14px;
    transition:all 0.25s ease;
    border-left:4px solid transparent;
}

/* HOVER */
.sidebar a:hover{
    background:rgba(255,255,255,0.15);
    padding-left:25px;
}

/* ACTIVE */
.sidebar a.active{
    background:linear-gradient(to right,#8B0000,#001f3f);
    border-left:4px solid #fff;
    font-weight:600;
}

/* MENU TITLE */
.menu-title{
    font-size:11px;
    color:#9ca3af;
    padding:12px 20px 5px;
    text-transform:uppercase;
    letter-spacing:1px;
}

/* BADGE */
.badge-notify{
    margin-left:auto;
    background:#dc3545;
    color:white;
    font-size:11px;
    padding:3px 7px;
    border-radius:50px;
}

/* ================= CONTENT ================= */
.content{
    margin-left:230px;
    margin-top:60px;
    padding:25px;
    min-height:calc(100vh - 120px);
    transition:0.3s;
}

.content.collapsed{
    margin-left:70px;
}

/* ================= CARDS ================= */
.card-ui{
    background:white;
    padding:20px;
    border-radius:12px;
    box-shadow:0 8px 20px rgba(0,0,0,0.08);
    margin-bottom:20px;
    transition:all 0.25s ease;
}

.card-ui:hover{
    transform:translateY(-2px);
    box-shadow:0 10px 25px rgba(0,0,0,0.12);
}

/* ================= TYPOGRAPHY ================= */
h4, h5{
    font-weight:600;
    color:#1f2937;
}

/* ================= FORMS ================= */
.form-control{
    border-radius:8px;
    border:1px solid #ddd;
    padding:10px;
}

.form-control:focus{
    border-color:#8B0000;
    box-shadow:0 0 0 2px rgba(139,0,0,0.1);
}

/* ================= BUTTONS ================= */
.btn{
    border-radius:8px;
    padding:8px 12px;
    font-weight:500;
    transition:0.2s;
}

.btn-primary{
    background:#001f3f;
    border:none;
}

.btn-primary:hover{
    background:#8B0000;
}

/* ================= TABLE ================= */
.table{
    border-radius:10px;
    overflow:hidden;
}

.table th{
    background:#001f3f;
    color:white;
    font-weight:500;
}

.table td{
    vertical-align:middle;
}

/* ================= FOOTER ================= */
.footer{
    margin-left:230px;
    padding:15px 25px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    font-size:13px;
    background:linear-gradient(to right,#8B0000,#001f3f);
    color:white;
}

.footer a{
    color:white;
    text-decoration:none;
}

.footer a:hover{
    color:#ffd700;
}

/* ================= TOAST ================= */
#toast-container{
    position:fixed;
    top:80px;
    right:20px;
    z-index:9999;
}

.toast{
    background:#198754;
    color:white;
    padding:12px 16px;
    margin-bottom:10px;
    border-radius:8px;
    box-shadow:0 5px 15px rgba(0,0,0,0.2);
    animation:slideIn 0.3s ease;
}

.toast.error{
    background:#dc3545;
}

.toast.warning{
    background:#ffc107;
    color:black;
}

@keyframes slideIn{
    from{transform:translateX(100%); opacity:0;}
    to{transform:translateX(0); opacity:1;}
}

/* ================= RESPONSIVE ================= */
@media (max-width:768px){

.sidebar{
    width:100%;
    height:auto;
    position:relative;
    top:0;
}

.content{
    margin-left:0;
    margin-top:10px;
}

.topbar{
    flex-direction:column;
    align-items:flex-start;
    height:auto;
    padding:10px;
}

.topbar > div{
    width:100%;
    justify-content:space-between;
    flex-wrap:wrap;
}

.notification-menu{
    width:100%;
}

.notification-button{
    width:100%;
}

.admin-top-actions{
    width:100%;
    display:grid;
    grid-template-columns:1fr;
}

.employee-checkin-link,
.admin-user-pill{
    width:100%;
}

.notification-panel{
    position:static;
    width:100%;
    margin-top:8px;
}

.footer{
    margin-left:0;
    flex-direction:column;
    text-align:center;
    gap:5px;
}

}/* ================= HEADER ENHANCEMENT ================= */
.topbar strong{
    font-size:16px;
}

.topbar div{
    display:flex;
    align-items:center;
}

.topbar .notification-panel{
    display:none;
    align-items:stretch;
}

.topbar .notification-panel.open{
    display:block;
}

.topbar .notification-panel a{
    display:flex;
}

.topbar .notification{
    position:relative;
    cursor:pointer;
}

@media (max-width: 640px){
    html, body{
        width:100%;
        overflow-x:hidden;
    }

    .topbar{
        position:relative;
        top:auto;
        left:auto;
        right:auto;
    }

    .sidebar{
        display:block;
        width:100%;
        height:auto;
        position:relative;
        top:auto;
        padding:10px;
    }

    .sidebar a{
        width:100%;
        min-height:44px;
        padding:11px 14px;
        border-radius:8px;
    }

    .sidebar a:hover{
        padding-left:14px;
    }

    .content,
    .content.collapsed{
        margin:0;
        padding:14px;
        width:100%;
    }

    .card-ui{
        padding:16px;
        border-radius:8px;
    }

    .row{
        row-gap:12px;
    }

    .btn,
    button,
    input[type="submit"]{
        width:100%;
        white-space:normal;
        margin-bottom:8px;
    }

    .form-control,
    select,
    textarea,
    input{
        max-width:100%;
    }

    .table-responsive{
        width:100%;
        overflow-x:auto;
        -webkit-overflow-scrolling:touch;
    }

    .table{
        min-width:720px;
    }

    .filter-box,
    form{
        width:100%;
    }
}
