@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');


/* =========================================================
   RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 0;

    font-family: 'DM Sans', sans-serif;

    background: #f8f5f0;
    color: #292522;

    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input,
select,
textarea {
    font-family: 'DM Sans', sans-serif;
}


/* =========================================================
   SIDEBAR
========================================================= */

.sidebar {
    position: fixed;

    top: 0;
    left: 0;

    width: 250px;
    height: 100vh;

    padding: 25px 16px;

    background: #211a16;
    color: #ffffff;

    z-index: 1001;

    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
}


/* =========================================================
   LOGO
========================================================= */

.logo {
    display: flex;
    align-items: center;

    gap: 12px;

    padding: 5px 12px 28px;
}

.logo-icon {
    width: 42px;
    height: 42px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: #6f4e37;

    font-size: 21px;
}

.logo-text {
    overflow: hidden;
}

.logo-text h2 {
    margin: 0;

    font-family: 'Playfair Display', serif;

    font-size: 20px;
    line-height: 1.1;

    color: #ffffff;
}

.logo-text span {
    display: block;

    margin-top: 4px;

    font-size: 10px;

    color: #aaa19b;

    white-space: nowrap;
}


/* =========================================================
   MENU TITLE
========================================================= */

.menu-title {
    padding: 18px 12px 8px;

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 1.2px;

    color: #746b65;
}


/* =========================================================
   MENU
========================================================= */

.sidebar-menu {
    margin: 0;
    padding: 0;

    list-style: none;
}

.sidebar-menu li {
    margin: 0 0 4px 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;

    width: 100%;

    gap: 13px;

    padding: 11px 13px;

    border-radius: 10px;

    color: #bdb5af;

    font-size: 13px;

    transition: background 0.2s ease,
                color 0.2s ease;
}

.sidebar-menu a:hover {
    background: rgba(255,255,255,0.08);

    color: #ffffff;
}

.sidebar-menu a.active {
    background: #6f4e37;

    color: #ffffff;
}

.sidebar-menu .icon {
    display: inline-block;

    width: 20px;
    min-width: 20px;

    text-align: center;

    font-size: 16px;
}

.sidebar-menu a.logout-menu:hover {
    background: rgba(198,93,85,0.18);

    color: #f0aaa5;
}


/* =========================================================
   MOBILE SIDEBAR ELEMENTS
========================================================= */

.sidebar-close {
    display: none;

    position: absolute;

    top: 12px;
    right: 12px;

    width: 34px;
    height: 34px;

    padding: 0;

    border: 0;
    border-radius: 8px;

    background: rgba(255,255,255,0.08);

    color: #ffffff;

    font-size: 24px;

    align-items: center;
    justify-content: center;

    cursor: pointer;

    z-index: 10;
}

.sidebar-overlay {
    display: none;

    position: fixed;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    background: rgba(0,0,0,0.45);

    z-index: 1000;
}


/* =========================================================
   MAIN
========================================================= */

.main {
    min-height: 100vh;

    margin-left: 250px;
}


/* =========================================================
   TOPBAR
========================================================= */

.topbar {
    position: sticky;

    top: 0;

    z-index: 900;

    width: 100%;
    height: 75px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 32px;

    background: #ffffff;

    border-bottom: 1px solid #ebe5df;
}

.header-left {
    display: flex;
    align-items: center;

    gap: 12px;

    min-width: 0;
}


/* =========================================================
   HAMBURGER
========================================================= */

.mobile-menu-btn {
    display: none;

    width: 40px;
    height: 40px;

    flex-shrink: 0;

    padding: 0;

    border: 0;
    border-radius: 10px;

    background: #f1e9e2;

    color: #4b3324;

    font-size: 20px;

    align-items: center;
    justify-content: center;

    cursor: pointer;
}

.mobile-menu-btn:hover {
    background: #eaded2;
}


/* =========================================================
   PAGE TITLE
========================================================= */

.page-title {
    min-width: 0;
}

.page-title h1 {
    margin: 0;

    font-size: 21px;

    font-weight: 700;

    line-height: 1.2;
}

.page-title p {
    margin: 3px 0 0 0;

    font-size: 12px;

    color: #8b817a;
}


/* =========================================================
   USER
========================================================= */

.user-box {
    display: flex;
    align-items: center;

    gap: 10px;

    flex-shrink: 0;
}

.avatar {
    width: 38px;
    height: 38px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #eaded2;

    color: #4b3324;

    font-weight: 700;
}

.user-info strong {
    display: block;

    font-size: 13px;
}

.user-info span {
    display: block;

    font-size: 11px;

    color: #8b817a;
}


/* =========================================================
   CONTENT
========================================================= */

.content {
    padding: 30px 32px;
}


/* =========================================================
   STATISTICS
========================================================= */

.stats-grid {
    display: flex;

    flex-wrap: wrap;

    margin-left: -9px;
    margin-right: -9px;

    margin-bottom: 7px;
}

.stat-card {
    width: calc(25% - 18px);

    margin-left: 9px;
    margin-right: 9px;

    margin-bottom: 18px;

    padding: 20px;

    background: #ffffff;

    border: 1px solid #ebe5df;

    border-radius: 16px;

    overflow: hidden;
}

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;
}

.stat-label {
    font-size: 12px;

    color: #8b817a;
}

.stat-icon {
    width: 38px;
    height: 38px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background: #f1e9e2;

    font-size: 17px;
}

.stat-value {
    margin-top: 13px;

    font-size: 25px;

    font-weight: 700;

    line-height: 1.2;

    word-wrap: break-word;
}

.stat-change {
    margin-top: 7px;

    font-size: 11px;

    color: #5f8d69;
}


/* =========================================================
   CARD
========================================================= */

.card {
    padding: 20px;

    background: #ffffff;

    border: 1px solid #ebe5df;

    border-radius: 16px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 20px;
}

.card-title {
    font-size: 16px;

    font-weight: 700;
}


/* =========================================================
   BUTTON
========================================================= */

.btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    min-height: 40px;

    padding: 9px 16px;

    border: 0;

    border-radius: 10px;

    font-size: 13px;

    font-weight: 600;

    cursor: pointer;
}

.btn-primary {
    background: #6f4e37;

    color: #ffffff;
}

.btn-primary:hover {
    background: #4b3324;
}

.btn-success {
    background: #5f8d69;

    color: #ffffff;
}

.btn-danger {
    background: #c65d55;

    color: #ffffff;
}

.btn-warning {
    background: #d69b45;

    color: #ffffff;
}


/* =========================================================
   TABLE
========================================================= */

.table-wrapper {
    width: 100%;

    overflow-x: auto;
}

table {
    width: 100%;

    border-collapse: collapse;
}

th {
    padding: 12px;

    text-align: left;

    font-size: 11px;

    font-weight: 700;

    color: #8b817a;

    border-bottom: 1px solid #ebe5df;
}

td {
    padding: 13px 12px;

    font-size: 13px;

    border-bottom: 1px solid #ebe5df;
}

tr:last-child td {
    border-bottom: 0;
}


/* =========================================================
   FORM
========================================================= */

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;

    margin-bottom: 7px;

    font-size: 12px;

    font-weight: 600;
}

.form-control {
    width: 100%;
    height: 42px;

    padding: 0 12px;

    border: 1px solid #ebe5df;

    border-radius: 10px;

    background: #ffffff;

    color: #292522;

    outline: none;

    font-size: 13px;
}

.form-control:focus {
    border-color: #6f4e37;

    box-shadow: 0 0 0 3px rgba(111,78,55,0.10);
}


/* =========================================================
   BADGE
========================================================= */

.badge {
    display: inline-block;

    padding: 5px 9px;

    border-radius: 20px;

    font-size: 10px;

    font-weight: 700;
}

.badge-success {
    background: #e7f1e9;

    color: #5f8d69;
}

.badge-danger {
    background: #f8e6e4;

    color: #c65d55;
}

.badge-warning {
    background: #fbf0dd;

    color: #d69b45;
}


/* =========================================================
   TABLET
========================================================= */

@media screen and (max-width: 1100px) {

    .content {
        padding: 25px;
    }

    .topbar {
        padding-left: 25px;
        padding-right: 25px;
    }

    .stat-card {
        width: calc(50% - 18px);
    }

}


/* =========================================================
   MOBILE
   SATU-SATUNYA BREAKPOINT MOBILE
========================================================= */

@media screen and (max-width: 768px) {

    /* MAIN */

    .main {
        width: 100%;

        margin-left: 0;
    }


    /* HAMBURGER */

    .mobile-menu-btn {
        display: flex !important;
    }


    /* SIDEBAR */

    .sidebar {
        width: 270px;

        padding: 25px 16px;

        transform: translateX(-100%);

        transition: transform 0.25s ease;

        box-shadow: 10px 0 30px rgba(0,0,0,0.20);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }


    /* CLOSE */

    .sidebar-close {
        display: flex;
    }


    /* OVERLAY */

    .sidebar-overlay.mobile-open {
        display: block;
    }


    /* TOPBAR */

    .topbar {
        height: 68px;

        padding-left: 15px;
        padding-right: 15px;
    }


    /* USER */

    .user-info {
        display: none;
    }


    .avatar {
        width: 35px;
        height: 35px;

        font-size: 13px;
    }


    /* TITLE */

    .page-title {
        overflow: hidden;
    }

    .page-title h1 {
        font-size: 17px;

        white-space: nowrap;

        overflow: hidden;

        text-overflow: ellipsis;
    }

    .page-title p {
        display: none;
    }


    /* CONTENT */

    .content {
        padding: 20px 15px;
    }


    /* STATISTICS */

    .stats-grid {
        display: block;

        margin-left: 0;
        margin-right: 0;

        margin-bottom: 0;
    }

    .stat-card {
        width: 100%;

        margin-left: 0;
        margin-right: 0;

        margin-bottom: 12px;

        padding: 17px;
    }

    .stat-value {
        font-size: 22px;
    }


    /* CARD */

    .card {
        padding: 16px;

        border-radius: 13px;
    }


    /* CARD HEADER */

    .card-header {
        display: block;

        margin-bottom: 16px;
    }


    /* BUTTON */

    .btn {
        width: 100%;
    }


    /* TABLE */

    .table-wrapper {
        width: 100%;

        overflow-x: auto;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media screen and (max-width: 380px) {

    .sidebar {
        width: 250px;
    }

    .topbar {
        padding-left: 12px;
        padding-right: 12px;
    }

    .content {
        padding: 15px 12px;
    }

    .mobile-menu-btn {
        width: 38px;
        height: 38px;
    }

    .avatar {
        width: 33px;
        height: 33px;
    }

    .page-title h1 {
        font-size: 16px;
    }

}