

:root{
    --header-height:80px;
    --footer-height:56px;
    --sidebar-width:260px;
}

html,
body{
    height:100%;
    margin:0;
    background:#f5f7fb;
    font-family:Segoe UI;
}

.app-container{
    min-height:100vh;
    background:#f5f7fb;
    display:flex;
    flex-direction:column;
}

/* Body container just needs to clear the fixed header/footer now.
   Sidebar + footer are position:fixed (taken out of flow), so this
   no longer needs to be a flex row driving their layout. */
.body-container{
    margin-top:var(--header-height);
    margin-bottom:var(--footer-height);
}

.top-header{
    position:fixed;
    top:0;
    left:0;
    right:0;
    height:var(--header-height);
    background:#fff;

    display:flex;
    justify-content:space-between;
    align-items:center;

    padding:0 30px;

    border-bottom:1px solid #ddd;
    box-shadow:0 2px 8px rgba(0,0,0,.08);

    z-index:1050;
}

.header-left{
    display:flex;
    align-items:center;
    gap:15px;
}

.header-logo{
    height:55px;
}

.header-right{
    display:flex;
    align-items:center;
    gap:15px;
}

.search-box{
    width:320px;
}

/* SIDEBAR: frozen in place between header and footer.
   position:fixed takes it out of normal flow and pins it to the
   viewport, so it no longer scrolls with the page. It gets its own
   scrollbar (overflow-y:auto) in case the menu is taller than the
   available space. */
.sidebar{
    position:fixed;
    top:var(--header-height);
    left:0;
    width:var(--sidebar-width);
    height:calc(100vh - var(--header-height) - var(--footer-height));
    overflow-y:auto;

    background:#fff;
    border-right:1px solid #ddd;

    z-index:1000;
}

/* Content now needs to make room for the fixed sidebar on the left
   (margin-left) and the fixed footer at the bottom (padding-bottom),
   otherwise the footer would sit on top of / hide the last bit of
   content. */
.content-area{
    margin-left:var(--sidebar-width);
    padding:25px;
    padding-bottom:calc(var(--footer-height) + 25px);
}

.card-body{

    background:#f5f6f7;
}

.form-control,
.form-select,
textarea{

    background:#ffffff;
}

label{

    font-weight:600;
    color:#495057;
}

.menu{
    list-style:none;
    margin:0;
    padding:0;
}

.menu li{
    margin:5px 10px;
}

.menu li a{
    display:flex;
    align-items:center;
    gap:10px;

    padding:12px 15px;

    color:#333;
    text-decoration:none;

    border-radius:10px;

    transition:all .3s ease;
}

.menu li a:hover{
    background:#eef4ff;
    color:#0d6efd;
}

/* Active Menu */

.active-menu{
    background:linear-gradient(
        135deg,
        #0d6efd,
        #4f9fff
    ) !important;

    color:white !important;

    font-weight:600;

    box-shadow:0 4px 12px rgba(
        13,
        110,
        253,
        .30
    );
}

.org-name{
    color:#233B7A;
    font-weight:800;
    font-size:32px;
    text-shadow:0 1px 1px rgba(0,0,0,0.1);
}

.app-name{
    color:#6c757d;
    font-size:15px;
    font-weight:500;
}

.active-menu i{
    color:white;
}

.notification-badge{
    position:absolute;
    top:-5px;
    right:-5px;
    background:red;
    color:white;
    border-radius:50%;
    width:20px;
    height:20px;
    font-size:12px;
}

.search-box input{
    border-radius:25px;
    padding-left:15px;
}

.user-info{
    font-weight:500;
}

.dropdown-toggle{
    border-radius:25px;
}

.logo{
    max-width:180px;
}

.dashboard-card{
    background:#ffffff;
    color:#334155;
    padding:25px;
    border-radius:15px;
    text-align:center;
    box-shadow:0 5px 15px rgba(0,0,0,.08);
    transition:transform .15s ease, box-shadow .15s ease;
    cursor:pointer;
}

.dashboard-card:hover{
    transform:translateY(-3px);
    box-shadow:0 8px 20px rgba(0,0,0,.14);
}

.dashboard-card i{
    font-size:40px;
    margin-bottom:10px;
}

.dashboard-card h2{
    font-size:36px;
    font-weight:bold;
    color:#1e293b;
    margin-bottom:4px;
}

.dashboard-card span{
    color:#64748b;
    font-size:14px;
    font-weight:500;
}

.total-card{
    background:linear-gradient(135deg,#0d6efd,#4f9fff);
}

.open-card{
    background:linear-gradient(135deg,#dc3545,#ff7676);
}

.progress-card{
    background:linear-gradient(135deg,#fd7e14,#ffb366);
}

.closed-card{
    background:linear-gradient(135deg,#198754,#58d68d);
}

.login-body{
    background:#f5f7fb;
}

.login-container{
    height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
}

.login-card{
    background:white;
    width:450px;
    padding:40px;
    border-radius:12px;
    text-align:center;
    box-shadow:0 3px 15px rgba(0,0,0,.15);
}

.login-logo{
    width:220px;
    margin-bottom:15px;
}

/* FOOTER: pinned to the bottom of the viewport at all times.
   Content clearance is handled above via .body-container's
   margin-bottom and .content-area's padding-bottom, so the footer
   never covers the last lines of content. */
.footer{
    position:fixed;
    bottom:0;
    left:0;
    right:0;
    height:var(--footer-height);

    background:#233B7A;
    color:white;

    padding:0 25px;

    display:flex;
    justify-content:space-between;
    align-items:center;

    border-top:3px solid #D71920;

    font-size:14px;

    z-index:1040;
}

.footer-left{
    font-weight:500;
}

.footer-center{
    color:#f1f1f1;
}

.footer-right a{

    color:white;
    margin-left:15px;

    font-size:18px;

    transition:all .3s ease;
}

.footer-right a:hover{

    color:#D71920;
    transform:translateY(-2px);

}

/* Icon rail: replaces the old col-md-3 sidebar. Fixed narrow width so
   it stops permanently eating a quarter of the page - each card is
   just an icon button until you hover it. */
.icon-rail{
    flex:0 0 64px;
    max-width:64px;
    display:flex;
    flex-direction:column;
    gap:12px;
    align-items:center;
    padding-top:2px;
}

.collapsible-card{
    position:relative;
    width:100%;
}

.card-icon-btn{
    width:48px;
    height:48px;
    display:flex;
    align-items:center;
    justify-content:center;

    background:#fff;
    border:1px solid #ddd;
    border-radius:12px;
    box-shadow:0 2px 6px rgba(0,0,0,.08);

    font-size:19px;
    color:#0d6efd;

    cursor:pointer;
    transition:all .25s ease;
}

.collapsible-card:hover .card-icon-btn{
    background:#0d6efd;
    color:#fff;
    box-shadow:0 4px 12px rgba(13,110,253,.3);
}

/* Flyout panel: hidden by default, appears to the left of its icon
   on hover so it never pushes the dashboard content around. */
.collapse-panel{
    position:absolute;
    top:0;
    right:58px;
    width:250px;

    background:#fff;
    border:1px solid #ddd;
    border-radius:12px;
    box-shadow:0 10px 28px rgba(0,0,0,.18);

    opacity:0;
    visibility:hidden;
    transform:translateX(8px);

    transition:opacity .25s ease, transform .25s ease, visibility .25s;

    z-index:1100;
}

.collapsible-card:hover .collapse-panel{
    opacity:1;
    visibility:visible;
    transform:translateX(0);
}

.collapse-panel-header{
    padding:12px 15px;
    font-weight:600;
    font-size:14px;
    color:#233B7A;
    border-bottom:1px solid #eee;
}

.collapse-panel-body{
    padding:12px 15px;
}

.quick-link{
    display:flex;
    align-items:center;
    gap:10px;

    padding:9px 10px;
    margin-bottom:4px;

    color:#333;
    text-decoration:none;
    font-size:13px;

    border-radius:8px;
    transition:all .25s ease;
}

.quick-link:last-child{
    margin-bottom:0;
}

.quick-link i{
    font-size:15px;
    color:#0d6efd;
}

.quick-link:hover{
    background:#eef4ff;
    color:#0d6efd;
    transform:translateX(3px);
}
.active-range{
    background:#0d6efd !important;
    color:white !important;
    border-color:#0d6efd !important;
    font-weight:600;
}

.range-btn{
    min-width:70px;
}
