/*
 Theme Name: Dashboard Pro
 Theme URI: 
 Author: Matt G
 Author URI: 
 Description: Your original design + fixed scrolling + preserved layout
 Version: 1.0.0
 License: GNU General Public License v2 or later
 License URI: https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain: dashboard-pro
*/


/* --------------------------------------------------------------
   RESET
-------------------------------------------------------------- */

html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,
blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,
em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,
u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,
caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,
embed,figure,figcaption,footer,header,hgroup,menu,nav,output,
ruby,section,summary,time,mark,audio,video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}


ol, ul { list-style: none; }
table { border-collapse: collapse; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

.screen-reader-text {
    border: 0;
    clip: rect(1px,1px,1px,1px);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    pad#f6f8f9;
    position: absolute!important;#f6f8f9
    width: 1px;
}

/* --------------------------------------------------------------
   VARIABLES
-------------------------------------------------------------- */

:root {
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 70px;

    --topbar-height: 70px;

    --header-bg: #f6f8f9;
    --sidebar-bg: #f6f8f9;
    --content-bg: #ffffff;

    --text-color: #333;
    --border-color: #e0e0e0;

    --transition: 0.3s ease;
}

/* --------------------------------------------------------------
   BODY & GLOBAL LAYOUT FIX
-------------------------------------------------------------- */

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;

    /* FIX: allow scrolling */
    overflow-x: hidden;
    overflow-y: auto;

    background: #fafafa;
    color: var(--text-color);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.dashboard {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* --------------------------------------------------------------
   HEADER / TOPBAR
-------------------------------------------------------------- */

header {
    height: var(--topbar-height);
    width: 100%;
    background: var(--header-bg);
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    flex-shrink: 0;
    z-index: 10;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

header img {
    height: 58px;
    width: 100px;
    object-fit: contain;
}

header .user-info {
    font-size: 0.95rem;
    font-weight: 500;
}

/* Mobile burger button */
.mobile-menu-toggle {
    display: none;
    border: none;
    background: transparent;
    font-size: 26px;
    cursor: pointer;
    padding: 0;
    margin-right: 0.25rem;
    z-index: 300;
}

.icon-burger { display: inline; }
.icon-close { display: none; }

/* --------------------------------------------------------------
   SIDEBAR
-------------------------------------------------------------- */

aside#sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    transition: width var(--transition), left var(--transition);
    display: flex;
    flex-direction: column;
    padding-top: 1rem;
    overflow-y: auto;
    flex-shrink: 0;
}

aside#sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

/* Collapse toggle */
.menu-toggle {
    align-self: flex-end;
    margin: 0.5rem 1rem;
    cursor: pointer;
    width: 24px;
    height: 24px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

/* Mobile close */
.sidebar-close {
    display: none;
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 26px;
    cursor: pointer;
    z-index: 999;
}

/* Sidebar menu items */
.menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1.2rem;
    font-size: 0.95rem;
    color: #444;
    text-decoration: none;
    transition: background var(--transition);
}

.menu-item:hover {
    background: #eceff1;
}

.menu-item img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Hide labels when collapsed */
aside#sidebar.collapsed .menu-item span {
    display: none;
}

/* Desktop icon logic */
#toggleSidebar img.icon-expand { display: none; }
#sidebar.collapsed #toggleSidebar img.icon-collapse { display: none; }
#sidebar.collapsed #toggleSidebar img.icon-expand { display: inline; }

/* --------------------------------------------------------------
   CONTENT AREA
-------------------------------------------------------------- */

main#content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background: var(--content-bg);

    border-top-left-radius: 14px;

    box-shadow: -1px -1px 10px rgba(0,0,0,0.03);

}

/* --------------------------------------------------------------
   MOBILE STYLES
-------------------------------------------------------------- */

@media (max-width: 768px) {

    header {
        padding: 0 1rem;
    }

    header img {
        width: 90px;
        height: auto;
    }

    .mobile-menu-toggle {
        display: block;
    }

    #toggleSidebar {
        display: none;
    }

    .sidebar-close {
        display: block;
    }

    aside#sidebar {
        position: fixed;
        top: var(--topbar-height);
        left: -70vw;
        width: 70vw;
        height: calc(100vh - var(--topbar-height));
        background: var(--sidebar-bg);
        z-index: 250;
        transition: left 0.3s ease;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    aside#sidebar.show {
        left: 0;
    }
main#content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background: var(--content-bg);

    border-top-left-radius: 14px;
    box-shadow: -1px -1px 10px rgba(0,0,0,0.03);

    /* FIX: make content fill screen so scrollbar appears */
    height: calc(100vh - var(--topbar-height));
}


    .dashboard {
        flex-direction: column;
        width: 100%;
        margin-left: 0 !important;
        overflow: visible;
    }
}

.dashboard {
    height: calc(100vh - var(--topbar-height));
    overflow: hidden;
}

main#content {
    height: 100%;
    overflow-y: auto !important;
}
