@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

body {
    font-family: 'Poppins', sans-serif;
    background: #EFF7F8;
    color: #A09E9E;
}

h1, h2, h3, h4, h5, h6 {
    color: #3F414D;
}

.login-container {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center
}

.card {
    background: #fff;
    padding: 30px;
    border-radius: 25px;
    width: 350px;
    box-shadow: rgba(45, 69, 95, 0.1) 0px 0px 25px 0px;
}

input, select, button {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

button {
    cursor: pointer;
    background: #089BAB;
    color: #fff;
    border: none;
    border-radius: 8px;
}

.app {
    display: none;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    min-width: 260px;
    top: 0;
    bottom: 0;
    height: auto;
    background: #009688;
    color: #fff;
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: rgba(45, 69, 95, 0.1) 0px 0px 25px 0px;
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header img.sidebar-logo {
    height: 40px;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #FFFFFF;
}

.sidebar-home-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-home-icon {
    font-size: 18px;
}

.sidebar-home-text {
    margin: 0;
    font-size: 16px;
}

.sidebar-nav {
    padding: 20px;
    flex: 1;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #FFFFFF;
    text-decoration: none;
    padding: 12px 16px;
    margin: 4px 0;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    width: calc(100% - 40px);
    box-sizing: border-box;
}

.sidebar a i {
    font-size: 15px;
    width: 12px;
    text-align: center;
    transition: all 0.2s ease;
}

.sidebar a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar a.active {
    background: #FFFFFF;
    color: #089BAB;
}

.sidebar a.active i {
    color: #089BAB;
}

.sidebar a.logout-link {
    margin-top: 20px;
    background: transparent;
}

.sidebar a.logout-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Custom Scrollbar for Sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.content {
    margin-left: 260px;
    padding: 30px;
    background: transparent;
    transition: margin-left 0.3s ease;
}

.topbar {
    background: #14b8a6;
    padding: 15px 25px;
    border-radius: 25px;
    margin-bottom: 25px;
    box-shadow: rgba(45, 69, 95, 0.1) 0px 0px 25px 0px;
    color: #fff;
}

.topbar h2 {
    color: #fff;
}

.rolebox {
    background: #FFFFFF;
    padding: 25px;
    border-radius: 25px;
    box-shadow: rgba(175, 175, 175, 0.1) 0px 4px 5px 1px;
}

.menu-btn {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: linear-gradient(135deg, #14b8a6, #0d9488);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.menu-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(20, 184, 166, 0.4);
}

.menu-btn:active {
    transform: translateY(0);
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@media(max-width:768px) {
    .sidebar {
        left: -260px;
        width: 240px;
        top: 0;
        bottom: 80px; /* leave space for mobile footer */
        min-height: calc(100vh - 80px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* make the nav area scroll independently inside the sidebar */
    .sidebar-nav {
        padding: 20px;
        flex: 1 1 auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        max-height: calc(100vh - 140px); /* account for header + footer */
        box-sizing: border-box;
    }

    .sidebar.show {
        left: 0;
    }

    .content {
        margin-left: 0;
        padding-top: 0;
    }

    .menu-btn {
        display: flex;
        top: 0px;
        left: 8px;
        width: 44px;
        height: 44px;
        border-radius: 10px;
        z-index: 1100;
    }

    .mobile-footer.show {
        display: flex;
    }

    .menu-btn i {
        color: #fff;
        font-size: 1.2rem;
    }

    .topbar {
        padding: 8px 10px;
        border-radius: 0;
        margin: 0;
        position: relative;
        height: 56px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #14b8a6;
        box-shadow: 0 8px 20px rgba(0,0,0,0.06);
        z-index: 1050;
        /* expand width to full viewport ignoring .content padding */
        left: -30px;
        width: calc(100% + 60px);
    }

    .topbar > div {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        max-width: 980px;
        padding: 0 56px; /* leave space for menu button and logo */
        box-sizing: border-box;
    }

    .topbar img {
        height: 28px;
        position: absolute;
        left: 72px; /* space for the menu button */
    }

    .topbar h2 {
        font-size: 1rem;
        margin: 0;
        text-align: right;
        font-weight: 600;
        color: #fff;
        position: absolute;
        right: 18px;
        max-width: calc(100% - 140px); /* reserve space for menu + logo */
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .sidebar a {
        padding: 12px 14px;
        font-size: 13px;
    }

    .sidebar-backdrop.show {
        display: block;
        opacity: 1;
    }

    .mobile-footer {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 10px;
        background: #14b8a6;
        box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.1);
        z-index: 1002;
        gap: 6px;
    }

    .mobile-footer .footer-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: #fff;
        text-decoration: none;
        font-size: 11px;
        padding: 8px 6px;
        border-radius: 14px;
        transition: background 0.2s ease;
    }

    .mobile-footer .footer-item i {
        font-size: 18px;
        margin-bottom: 4px;
    }

    .mobile-footer .footer-item:hover {
        background: rgba(255, 255, 255, 0.15);
    }

    .rolebox > div {
        padding: 12px 16px !important;
    }

    .content {
        padding-bottom: 80px;
    }
}

.mobile-footer {
    display: none;
}

@media(max-width:768px) {
    .mobile-footer {
        display: flex;
    }

    .mobile-footer .footer-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: #fff;
        text-decoration: none;
        font-size: 11px;
        padding: 8px 6px;
        border-radius: 14px;
        transition: background 0.2s ease;
    }

    .mobile-footer .footer-item i {
        font-size: 18px;
        margin-bottom: 4px;
    }

    .mobile-footer .footer-item:hover {
        background: rgba(255, 255, 255, 0.15);
    }

    .rolebox > div {
        padding: 12px 16px !important;
    }

    .content {
        padding-bottom: 80px;
    }
}

.markdown-body {
    box-sizing: border-box;
    min-width: 200px;
    max-width: 980px;
    margin: 40px auto;
    padding: 30px
}

.doc-back {
    display: inline-block;
    margin-bottom: 15px;
    padding: 8px 12px;
    background: #009688;
    color: #fff;
    border-radius: 6px;
    text-decoration: none
}
