:root{
    --green:#1fa463;
    --green-soft:#edf7ef;
    --bg:#eef3f7;
    --border:#dfe7ee;
    --text:#111827;
    --muted:#6b7280;
    --white:#ffffff;
}

*{box-sizing:border-box}
html,body{height:100%}

body{
    margin:0;
    font-family:Arial,sans-serif;
    background:var(--bg);
    color:var(--text);
}

.platform-sidebar{
    position:fixed;
    top:0;
    left:0;
    width:300px;
    height:100vh;
    background:var(--white);
    border-right:1px solid var(--border);
    display:flex;
    flex-direction:column;
    z-index:1000;
    transition:width .25s ease;
}

.platform-sidebar.is-collapsed{
    width:88px;
}

.platform-sidebar-top{
    height:74px;
    padding:0 16px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    border-bottom:1px solid var(--border);
    flex-shrink:0;
}

.platform-brand{
    display:flex;
    align-items:center;
    gap:12px;
    text-decoration:none;
}

.platform-brand-logo{
    width:38px;
    height:38px;
    object-fit:contain;
    display:block;
}

.platform-brand-name{
    font-size:15px;
    font-weight:800;
    color:var(--green);
    white-space:nowrap;
}

.platform-sidebar-toggle{
    width:34px;
    height:34px;
    border:none;
    border-radius:10px;
    background:#f3f6f9;
    color:#334155;
    cursor:pointer;
}

.platform-sidebar-menu{
    flex:1;
    min-height:0;
    overflow-y:auto;
    padding:14px 12px 12px;
}

.menu-link,
.menu-group-btn{
    width:100%;
    min-height:50px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 14px;
    border:none;
    border-radius:16px;
    background:transparent;
    color:var(--text);
    text-decoration:none;
    cursor:pointer;
    font-size:15px;
    margin-bottom:8px;
}

.menu-left{
    display:flex;
    align-items:center;
    min-width:0;
}

.menu-icon{
    width:22px;
    margin-right:10px;
    text-align:center;
    flex-shrink:0;
}

.menu-text{
    white-space:nowrap;
}

.menu-link:hover,
.menu-group-btn:hover{
    background:#f4f8f5;
}

.menu-link.active{
    background:var(--green-soft);
    color:#166534;
    font-weight:700;
    position:relative;
}

.menu-link.active::before{
    content:"";
    position:absolute;
    left:0;
    top:10px;
    bottom:10px;
    width:4px;
    background:var(--green);
    border-radius:4px;
}

.menu-group{
    margin-bottom:4px;
}

.menu-arrow{
    color:#64748b;
    transition:transform .2s ease;
}

.menu-group.is-open .menu-arrow{
    transform:rotate(180deg);
}

.menu-sub{
    display:none;
    padding:0 0 8px 34px;
}

.menu-group.is-open .menu-sub{
    display:block;
}

.menu-sub a{
    display:block;
    padding:9px 12px;
    border-radius:10px;
    text-decoration:none;
    color:#4b5563;
    font-size:13px;
    margin-bottom:4px;
}

.menu-sub a:hover{
    background:#f7faf8;
    color:#111827;
}

.menu-bottom{
    padding-top:10px;
    margin-top:10px;
    border-top:1px solid var(--border);
}

.platform-sidebar.is-collapsed .platform-brand-name,
.platform-sidebar.is-collapsed .menu-text,
.platform-sidebar.is-collapsed .menu-arrow,
.platform-sidebar.is-collapsed .menu-sub{
    display:none !important;
}

.platform-sidebar.is-collapsed .menu-link,
.platform-sidebar.is-collapsed .menu-group-btn{
    justify-content:center;
    padding:0;
}

.platform-sidebar.is-collapsed .menu-icon{
    margin-right:0;
}

.platform-content{
    margin-left:300px;
    padding:28px;
    transition:margin-left .25s ease;
}

.platform-content.is-collapsed{
    margin-left:88px;
}

.platform-header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:18px;
    margin-bottom:22px;
}

.platform-header-left h1{
    margin:0 0 10px;
    font-size:52px;
    line-height:1;
    font-weight:800;
}

.platform-header-left p{
    margin:0;
    color:#374151;
}

.platform-user{
    display:flex;
    align-items:center;
    gap:12px;
    background:#fff;
    border:1px solid var(--border);
    border-radius:16px;
    padding:10px 12px;
}

.platform-user-avatar{
    width:42px;
    height:42px;
    border-radius:12px;
    background:var(--green-soft);
    color:#166534;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:800;
}

.platform-user-info strong{
    display:block;
    font-size:14px;
}

.platform-user-info span{
    display:block;
    font-size:12px;
    color:var(--muted);
}

.platform-logout{
    text-decoration:none;
    color:#111827;
    background:#f8fafc;
    border:1px solid var(--border);
    border-radius:12px;
    padding:10px 14px;
    font-size:13px;
    font-weight:700;
}

.platform-card{
    background:#fff;
    border:1px solid var(--border);
    border-radius:24px;
    padding:26px 28px;
    min-height:92px;
}

@media (max-width: 900px){

    html,
    body{
        overflow-x: hidden;
    }

    .platform-sidebar,
    .platform-sidebar.is-collapsed{
        width: 164px;
        min-width: 164px;
        max-width: 164px;
        overflow: hidden;
    }

    main.platform-content,
.platform-content,
.platform-content.is-collapsed{
    box-sizing: border-box;
    margin-left: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    padding: 12px 12px 12px 176px !important;
    overflow-x: hidden !important;
    transform: none !important;
}

    .platform-card{
        box-sizing: border-box;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    .platform-header{
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .platform-header-left h1{
        font-size: 32px;
        line-height: 1.05;
        word-break: break-word;
    }

    .platform-user{
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
        
    @media (max-width: 900px) {

    .platform-sidebar {
        width: 88px !important;
        min-width: 88px !important;
        max-width: 88px !important;
    }

    .platform-content {
        margin-left: 88px !important;
        width: calc(100% - 88px) !important;
        max-width: calc(100% - 88px) !important;
        padding: 12px !important;
        box-sizing: border-box;
    }

