/* ==========================================================
   SIMANTAP
   LAYOUT CSS
   Sistem Informasi Manajemen Antrian Pelayanan Terpadu
   Kantor Kementerian Agama Kota Salatiga
========================================================== */


/* ==========================================================
   WRAPPER
========================================================== */

.wrapper {
    display: flex;
    min-height: 100vh;
}


/* ==========================================================
   SIDEBAR
========================================================== */

.sidebar {
    width: 270px;

    background: linear-gradient(
        180deg,
        #0f5132,
        #0b3d27
    );

    color: #ffffff;

    position: fixed;

    left: 0;
    top: 0;
    bottom: 0;

    overflow-y: auto;

    box-shadow:
        5px 0 30px rgba(0, 0, 0, .10);

    z-index: 999;
}


/* ==========================================================
   SIDEBAR LOGO
========================================================== */

.sidebar-logo {
    text-align: center;
    padding: 30px 20px;
}

.sidebar-logo img {
    width: 90px;
    margin-bottom: 15px;
}

.sidebar-logo h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 5px;
}

.sidebar-logo span {
    font-size: 13px;
    opacity: .8;
}


/* ==========================================================
   SIDEBAR MENU
========================================================== */

.sidebar-menu {
    padding: 15px;
}

.sidebar-menu h6 {
    color: rgba(255, 255, 255, .55);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 25px 15px 10px;
}

.sidebar-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 6px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 14px;

    padding: 14px 18px;

    border-radius: 14px;

    color: #ffffff;

    text-decoration: none;

    font-size: 15px;
    font-weight: 500;

    transition: .30s ease;
}

.sidebar-menu a i {
    width: 22px;
    font-size: 18px;
    text-align: center;
}

.sidebar-menu a:hover {
    background: rgba(255, 255, 255, .12);
    transform: translateX(6px);
}

.sidebar-menu .active {
    background: #ffffff;
    color: #0B7A53;
    font-weight: 700;

    box-shadow:
        0 10px 20px rgba(0, 0, 0, .15);
}

.sidebar-menu .active i {
    color: #F4C542;
}


/* ==========================================================
   SIDEBAR DIVIDER
========================================================== */

.sidebar-divider {
    height: 1px;

    margin: 15px 20px;

    background: rgba(255, 255, 255, .12);
}


/* ==========================================================
   LOGOUT
========================================================== */

.sidebar-logout {
    padding: 0 15px;
}

.sidebar-logout a {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 11px 15px;

    border-radius: 10px;

    color: #ffb4b4;

    text-decoration: none;

    transition: .2s ease;
}

.sidebar-logout a:hover {
    background: rgba(255, 80, 80, .12);
    color: #ff7777;
}

.sidebar-logout i {
    font-size: 18px;
}


/* ==========================================================
   MAIN CONTENT
========================================================== */

.main-content {
    margin-left: 270px;

    width: calc(100% - 270px);

    min-height: 100vh;

    display: flex;
    flex-direction: column;
}


/* ==========================================================
   TOPBAR
   Satu-satunya CSS Topbar SIMANTAP
========================================================== */

.topbar {
    min-height: 82px;

    background: #ffffff;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 12px 30px;

    border-bottom: 1px solid #e5e7eb;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, .08);

    position: sticky;

    top: 0;

    z-index: 100;
}


/* ==========================================================
   TOPBAR LEFT
========================================================== */

.topbar-left {
    display: flex;
    align-items: center;

    gap: 16px;

    min-width: 250px;
}


/* ==========================================================
   MENU TOGGLE
========================================================== */

.menu-toggle {
    width: 44px;
    height: 44px;

    border: none;

    background: #f4f6f9;

    border-radius: 12px;

    color: #374151;

    font-size: 21px;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    transition: .3s ease;
}

.menu-toggle:hover {
    background: #0F8A5F;
    color: #ffffff;

    transform: translateY(-2px);
}


/* ==========================================================
   PAGE TITLE
========================================================== */

.page-title {
    min-width: 0;
}

.page-title h2 {
    margin: 0;

    font-size: 24px;

    line-height: 1.2;

    font-weight: 700;

    color: #1f2937;
}

.page-title small {
    display: block;

    margin-top: 3px;

    color: #6b7280;

    font-size: 11px;

    white-space: nowrap;
}


/* ==========================================================
   TOPBAR CENTER / SEARCH
========================================================== */

.topbar-center {
    flex: 1;

    display: flex;

    justify-content: center;

    padding: 0 30px;
}

.search-box {
    width: min(420px, 100%);

    display: flex;

    align-items: center;

    background: #f7f8fb;

    border: 1px solid #eef0f3;

    padding: 10px 17px;

    border-radius: 30px;

    transition: .3s ease;
}

.search-box:focus-within {
    background: #ffffff;

    border-color: #0F8A5F;

    box-shadow:
        0 0 0 3px rgba(15, 138, 95, .10);
}

.search-box i {
    color: #9ca3af;

    margin-right: 11px;

    font-size: 16px;
}

.search-box input {
    border: none;

    outline: none;

    background: transparent;

    width: 100%;

    font-family: 'Poppins', sans-serif;

    font-size: 13px;

    color: #374151;
}

.search-box input::placeholder {
    color: #9ca3af;
}


/* ==========================================================
   TOPBAR RIGHT
========================================================== */

.topbar-right {
    display: flex;

    align-items: center;

    gap: 14px;

    min-width: 330px;

    justify-content: flex-end;
}


/* ==========================================================
   DATE / TIME
========================================================== */

.datetime {
    text-align: right;

    line-height: 1.25;
}

#clock {
    font-size: 17px;

    font-weight: 700;

    color: #0F8A5F;
}

#today {
    margin-top: 3px;

    font-size: 11px;

    color: #777777;

    white-space: nowrap;
}


/* ==========================================================
   TOPBAR ICON
========================================================== */

.icon-btn {
    position: relative;

    width: 44px;
    height: 44px;

    border: none;

    background: #f4f6f9;

    color: #4b5563;

    border-radius: 50%;

    display: flex;

    align-items: center;
    justify-content: center;

    cursor: pointer;

    transition: .3s ease;
}

.icon-btn:hover {
    background: #0F8A5F;

    color: #ffffff;

    transform: translateY(-2px);
}


/* ==========================================================
   NOTIFICATION BADGE
========================================================== */

.icon-btn .badge {
    position: absolute;

    top: 4px;
    right: 3px;

    background: #ff3b30;

    color: #ffffff;

    border-radius: 50%;

    width: 17px;
    height: 17px;

    padding: 0;

    font-size: 10px;

    display: flex;

    align-items: center;
    justify-content: center;

    font-weight: 600;

    border: 2px solid #ffffff;
}


/* ==========================================================
   PROFILE
========================================================== */

.profile {
    display: flex;

    align-items: center;

    gap: 11px;

    cursor: pointer;

    padding-left: 4px;
}

.profile img {
    width: 45px;
    height: 45px;

    border-radius: 50%;

    object-fit: cover;

    border: 3px solid #0F8A5F;
}

.profile strong {
    display: block;

    font-size: 14px;

    font-weight: 700;

    color: #263238;

    line-height: 1.3;
}

.profile small {
    display: block;

    margin-top: 2px;

    color: #6b7280;

    font-size: 11px;
}


/* ==========================================================
   CONTENT
========================================================== */

.content {
    padding: 30px;

    flex: 1;
}


/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width: 1200px) {

    .topbar-center {
        padding: 0 15px;
    }

    .topbar-right {
        min-width: auto;
    }

    .datetime {
        display: none;
    }

}


@media (max-width: 900px) {

    .topbar-center {
        display: none;
    }

    .topbar-left {
        min-width: auto;
    }

}


@media (max-width: 768px) {

    .main-content {
        margin-left: 0;

        width: 100%;
    }

    .sidebar {
        left: -270px;
    }

    .topbar {
        min-height: 70px;

        padding: 10px 15px;
    }

    .page-title h2 {
        font-size: 20px;
    }

    .page-title small {
        font-size: 10px;
    }

    .profile > div {
        display: none;
    }

    .content {
        padding: 20px;
    }

}


@media (max-width: 480px) {

    .topbar {
        padding: 10px;
    }

    .topbar-left {
        gap: 10px;
    }

    .menu-toggle {
        width: 40px;
        height: 40px;

        font-size: 19px;
    }

    .page-title h2 {
        font-size: 18px;
    }

    .page-title small {
        display: none;
    }

    .topbar-right {
        gap: 7px;
    }

    .icon-btn {
        width: 40px;
        height: 40px;
    }

    .profile img {
        width: 40px;
        height: 40px;
    }
}