/* =========================================================
   POS COFFEE SHOP
   Login Page
   ========================================================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
}


/* =========================================================
   LOGIN PAGE
   ========================================================= */

.login-page {
    min-height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 30px 15px;

    background:
        linear-gradient(
            135deg,
            #0f766e 0%,
            #0d9488 35%,
            #2563eb 100%
        );
}


/* =========================================================
   LOGIN CARD
   ========================================================= */

.login-card {
    width: 100%;
    max-width: 420px;

    background: rgba(255, 255, 255, 0.97);

    border-radius: 20px;

    padding: 40px;

    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.20);

    animation: cardFade 0.5s ease;
}


@keyframes cardFade {

    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* =========================================================
   HEADER
   ========================================================= */

.login-header {
    text-align: center;

    margin-bottom: 32px;
}


.coffee-logo {
    width: 80px;
    height: 80px;

    margin: 0 auto 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: linear-gradient(
        135deg,
        #16a34a,
        #0f766e
    );

    color: white;

    font-size: 36px;

    box-shadow:
        0 10px 25px rgba(15, 118, 110, 0.30);
}


.login-header h2 {
    margin: 0;

    font-size: 26px;

    font-weight: 700;

    color: #1f2937;
}


.login-header p {
    margin: 8px 0 0;

    color: #6b7280;

    font-size: 14px;
}


/* =========================================================
   FORM
   ========================================================= */

.form-group {
    margin-bottom: 20px;
}


.form-group label {
    display: block;

    margin-bottom: 8px;

    font-size: 14px;

    font-weight: 600;

    color: #374151;
}


.input-box {
    position: relative;

    display: flex;
    align-items: center;
}


.input-box > i {
    position: absolute;

    left: 15px;

    color: #9ca3af;

    font-size: 15px;

    pointer-events: none;
}


.input-box input {
    width: 100%;

    height: 48px;

    padding: 0 45px;

    border: 1px solid #d1d5db;

    border-radius: 10px;

    outline: none;

    font-size: 14px;

    color: #1f2937;

    background: #ffffff;

    transition: all 0.2s ease;
}


.input-box input::placeholder {
    color: #9ca3af;
}


.input-box input:focus {
    border-color: #0d9488;

    box-shadow:
        0 0 0 3px rgba(13, 148, 136, 0.12);
}


/* =========================================================
   PASSWORD TOGGLE
   ========================================================= */

.password-toggle {
    position: absolute;

    right: 8px;

    width: 34px;
    height: 34px;

    border: none;

    background: transparent;

    color: #9ca3af;

    border-radius: 6px;

    cursor: pointer;

    transition: 0.2s;
}


.password-toggle:hover {
    color: #0f766e;

    background: #f0fdfa;
}


/* =========================================================
   LOGIN BUTTON
   ========================================================= */

.btn-login {
    width: 100%;

    height: 48px;

    margin-top: 8px;

    border: none;

    border-radius: 10px;

    background: linear-gradient(
        135deg,
        #16a34a,
        #0f766e
    );

    color: white;

    font-size: 15px;

    font-weight: 600;

    cursor: pointer;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 10px;

    transition: all 0.2s ease;

    box-shadow:
        0 8px 20px rgba(15, 118, 110, 0.25);
}


.btn-login:hover {
    transform: translateY(-1px);

    box-shadow:
        0 12px 25px rgba(15, 118, 110, 0.30);
}


.btn-login:active {
    transform: translateY(0);
}


/* =========================================================
   FOOTER
   ========================================================= */

.login-footer {
    margin-top: 28px;

    padding-top: 20px;

    border-top: 1px solid #e5e7eb;

    text-align: center;

    color: #9ca3af;

    font-size: 12px;
}


.login-footer i {
    margin-right: 5px;

    color: #0f766e;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 480px) {

    .login-page {
        padding: 20px 15px;
    }

    .login-card {
        padding: 30px 24px;

        border-radius: 16px;
    }

    .coffee-logo {
        width: 70px;
        height: 70px;

        font-size: 30px;
    }

    .login-header h2 {
        font-size: 23px;
    }

}

/* =========================================================
   APPLICATION LAYOUT
   ========================================================= */

.app-body {
    margin: 0;
    min-height: 100vh;

    background: #f5f7fb;

    color: #1f2937;

    font-family: "Segoe UI", Arial, sans-serif;
}


/* =========================================================
   SIDEBAR
   ========================================================= */

.sidebar {
    position: fixed;

    top: 0;
    left: 0;
    bottom: 0;

    width: 250px;

    background: #12372a;

    color: #fff;

    z-index: 1100;

    overflow-y: auto;

    transition: transform .3s ease, width .3s ease;

    box-shadow:
        3px 0 15px rgba(0, 0, 0, .08);
}


.sidebar-brand {
    height: 70px;

    display: flex;
    align-items: center;

    padding: 0 20px;

    border-bottom:
        1px solid rgba(255,255,255,.08);

    font-size: 18px;

    font-weight: 700;
}


.sidebar-brand-icon {
    width: 40px;
    height: 40px;

    margin-right: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: rgba(255,255,255,.12);
}


.sidebar-menu {
    padding: 18px 12px;
}


.sidebar-section-title {
    margin-top: 18px;

    margin-bottom: 7px;

    padding: 0 12px;

    color: rgba(255,255,255,.42);

    font-size: 11px;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: .7px;
}


.sidebar-section-title:first-child {
    margin-top: 5px;
}


.sidebar-menu a {
    display: flex;
    align-items: center;

    min-height: 44px;

    margin-bottom: 4px;

    padding: 10px 13px;

    border-radius: 9px;

    color: rgba(255,255,255,.70);

    text-decoration: none;

    font-size: 14px;

    transition: .2s ease;
}


.sidebar-menu a i {
    width: 23px;

    margin-right: 10px;

    text-align: center;
}


.sidebar-menu a:hover {
    background: rgba(255,255,255,.08);

    color: #fff;
}


.sidebar-menu a.active {
    background: #198754;

    color: #fff;

    box-shadow:
        0 5px 15px rgba(25,135,84,.20);
}

.sidebar-logo {
    width: 25px;
    height: 25px;

    object-fit: contain;

    display: block;
}


/* =========================================================
   MAIN
   ========================================================= */

.main-content {
    min-height: 100vh;

    margin-left: 250px;

    width: calc(100% - 250px);

    display: flex;

    flex-direction: column;
	
	padding-bottom: 55px;

    transition: margin-left .3s ease, width .3s ease;
}

/* =========================================================
   SIDEBAR COLLAPSE - SEMUA PLATFORM
   ========================================================= */

body.sidebar-hidden .sidebar {
    transform: translateX(-100%);
}

body.sidebar-hidden .main-content {
    margin-left: 0;
    width: 100%;
}

/* =========================================
   HEADER / TOP NAVBAR
========================================= */

.top-navbar {
    height: 72px;
    min-height: 72px;
    width: 100%;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
    z-index: 1200;
    box-sizing: border-box;
}

/* Bagian kiri */
.navbar-left {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1;
}

/* Tombol hamburger */
.sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;

    margin-right: 14px;
    padding: 0;

    border: 0;
    border-radius: 9px;

    background: #f3f4f6;
    color: #374151;

    cursor: pointer;
    position: relative;
    z-index: 1300;

    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;

    transition: background 0.2s ease;
}

.sidebar-toggle:hover {
    background: #e5e7eb;
}

.sidebar-toggle:active {
    transform: scale(0.96);
}

.sidebar-toggle i {
    font-size: 19px;
    line-height: 1;
    pointer-events: none;
}


/* =========================================
   JUDUL HALAMAN
========================================= */

.page-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    color: #111827;
}

.page-subtitle {
    margin-top: 3px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    color: #9ca3af;
}


/* =========================================
   USER AREA
========================================= */

.navbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    height: 100%;
}

.user-menu {
    position: relative;
    z-index: 1300;
    height: 100%;
    display: flex;
    align-items: center;
}

.user-button {
    display: flex;
    flex-direction: row;

    align-items: center;
    justify-content: flex-end;

    gap: 10px;

    height: 100%;
    min-width: 120px;

    padding: 0 4px 0 10px;
    margin: 0;

    border: 0;
    background: transparent;

    cursor: pointer;
}

.user-info {
    display: flex;
    flex-direction: column;

    align-items: flex-end;
    justify-content: center;

    text-align: right;
    line-height: 1.2;

    min-width: 0;
}

.user-name {
    max-width: 130px;

    font-size: 13px;
    font-weight: 600;
    color: #374151;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    margin-top: 3px;

    font-size: 10px;
    font-weight: 500;
    color: #9ca3af;

    text-transform: uppercase;
}


/* =========================================
   USER AVATAR
========================================= */

.user-avatar {
    width: 42px;
    height: 42px;

    min-width: 42px;
    min-height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #198754;
    color: #ffffff;

    flex-shrink: 0;
}

.user-avatar i {
    font-size: 17px;
}


/* =========================================================
   DROPDOWN
   ========================================================= */

.user-menu {
    position: relative;
	z-index: 1300;
}


.user-dropdown {
    position: absolute;

    top: calc(100% - 3px);
    right: 0;

    width: 210px;

    padding: 8px 0;

    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);

    z-index: 1400;

    display: none;
}


.user-dropdown.show {
    display: block;
}


.user-dropdown-header {
    padding: 7px 9px;

    display: flex;

    flex-direction: column;
}


.user-dropdown-header strong {
    font-size: 13px;
}


.user-dropdown-header small {
    margin-top: 3px;

    color: #9ca3af;

    font-size: 11px;
}


.dropdown-divider {
    height: 1px;

    margin: 5px 0;

    background: #e5e7eb;
}


.user-dropdown a,
.user-dropdown button {
    width: 100%;

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 10px;

    border: 0;

    border-radius: 7px;

    background: transparent;

    color: #374151;

    text-decoration: none;

    font-size: 13px;

    cursor: pointer;

    text-align: left;
}


.user-dropdown a:hover {
    background: #f3f4f6;
}


.user-dropdown .logout-button {
    color: #dc3545;
}


.user-dropdown .logout-button:hover {
    background: #fff1f2;
}


/* =========================================================
   CONTENT
   ========================================================= */

.content-wrapper {
    flex: 1;

    padding: 25px;
}


/* =========================================================
   DASHBOARD HEADER
   ========================================================= */

.dashboard-header {
    margin-bottom: 22px;
}


.dashboard-header h2 {
    margin: 0;

    font-size: 19px;

    color: #1f2937;
}


.dashboard-header p {
    margin: 7px 0 0;

    font-size: 14px;

    color: #6b7280;
}


/* =========================================================
   STATISTICS
   ========================================================= */

.dashboard-stats {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 16px;

    margin-bottom: 20px;
}


.stat-card {
    min-width: 0;

    padding: 20px;

    background: #fff;

    border: 1px solid #edf0f2;

    border-radius: 14px;

    box-shadow:
        0 3px 14px rgba(0,0,0,.04);

    transition: .2s ease;
}


.stat-card:hover {
    transform: translateY(-2px);

    box-shadow:
        0 8px 22px rgba(0,0,0,.07);
}


.stat-card-top {
    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 10px;
}


.stat-title {
    margin-bottom: 5px;

    color: #6b7280;

    font-size: 13px;
}


.stat-value {
    color: #111827;

    font-size: 25px;

    font-weight: 700;

    line-height: 1.2;
}


.stat-money {
    font-size: 19px;
}


.stat-icon {
    width: 48px;
    height: 48px;

    flex-shrink: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 12px;

    font-size: 18px;
}


.stat-icon-green {
    background: #e8f5e9;

    color: #198754;
}


.stat-icon-orange {
    background: #fff4e5;

    color: #f59f00;
}


.stat-icon-blue {
    background: #e7f1ff;

    color: #0d6efd;
}


.stat-icon-purple {
    background: #f3e8ff;

    color: #8b5cf6;
}


.stat-description {
    margin-top: 17px;

    color: #9ca3af;

    font-size: 12px;
}


/* =========================================================
   RECENT TRANSACTION
   ========================================================= */

.recent-card {
    background: #fff;

    border: 1px solid #edf0f2;

    border-radius: 14px;

    box-shadow:
        0 3px 14px rgba(0,0,0,.04);

    overflow: hidden;
}


.recent-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    padding: 20px;

    border-bottom: 1px solid #edf0f2;
}


.recent-header h3 {
    margin: 0;

    font-size: 16px;

    font-weight: 700;
}


.recent-header p {
    margin: 5px 0 0;

    color: #9ca3af;

    font-size: 12px;
}


.btn-view-all {
    display: inline-flex;

    align-items: center;

    gap: 7px;

    padding: 8px 12px;

    border: 1px solid #198754;

    border-radius: 7px;

    color: #198754;

    background: #fff;

    text-decoration: none;

    font-size: 12px;

    transition: .2s;
}


.btn-view-all:hover {
    background: #198754;

    color: #fff;
}


/* =========================================================
   TABLE
   ========================================================= */

.table-container {
    width: 100%;

    overflow-x: auto;
}


.dashboard-table {
    width: 100%;

    border-collapse: collapse;

    min-width: 650px;
}


.dashboard-table th {
    padding: 13px 20px;

    background: #fafbfc;

    color: #6b7280;

    font-size: 12px;

    font-weight: 600;

    text-align: left;

    white-space: nowrap;
}


.dashboard-table td {
    padding: 14px 20px;

    border-top: 1px solid #f0f1f3;

    color: #4b5563;

    font-size: 13px;
}


.dashboard-table tbody tr:hover {
    background: #fafdfb;
}


/* =========================================================
   STATUS
   ========================================================= */

.status-success,
.status-danger {
    display: inline-flex;

    align-items: center;

    gap: 5px;

    padding: 5px 9px;

    border-radius: 20px;

    font-size: 11px;

    font-weight: 600;
}


.status-success {
    background: #e8f5e9;

    color: #198754;
}


.status-danger {
    background: #fff1f2;

    color: #dc3545;
}


/* =========================================================
   EMPTY DATA
   ========================================================= */

.empty-data {
    height: 150px;

    text-align: center;

    color: #9ca3af !important;
}


.empty-data i {
    display: block;

    margin-bottom: 8px;

    font-size: 25px;
}


/* =========================================================
   FOOTER
   ========================================================= */

.app-footer {
    min-height: 55px;

    flex-shrink: 0;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    padding: 0 25px;

    background: #fff;

    border-top: 1px solid #e9ecef;

    color: #9ca3af;

    font-size: 12px;
}


.app-footer i {
    color: #198754;
}


.footer-divider {
    margin: 0 6px;

    color: #d1d5db;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1199px) {

    .dashboard-stats {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/* =========================================================
   MOBILE / TABLET
   ========================================================= */

@media (max-width: 991px) {

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .top-navbar {
		position: relative;
		z-index: 1200;
	}


    .page-title {
        font-size: 17px;
    }


    .page-subtitle {
        display: none;
    }


    .content-wrapper {
        padding: 15px;
    }


    .dashboard-stats {
        grid-template-columns: 1fr;

        gap: 12px;
    }


    .dashboard-header {
        margin-bottom: 17px;
    }


    .dashboard-header h2 {
        font-size: 17px;
    }


    .dashboard-header p {
        font-size: 13px;
    }


    .recent-header {
        align-items: flex-start;

        flex-direction: column;
    }


    .btn-view-all {
        width: 100%;

        justify-content: center;
    }


    .app-footer {
        min-height: auto;

        padding: 15px;

        flex-direction: column;

        justify-content: center;

        text-align: center;

        gap: 5px;
    }

}


/* =========================================================
   SMALL HP
   ========================================================= */

@media (max-width: 400px) {

    .stat-card {
        padding: 16px;
    }


    .stat-value {
        font-size: 22px;
    }


    .stat-money {
        font-size: 17px;
    }

}

/* =========================================================
   KATEGORI PAGE
   ========================================================= */

.page-header-custom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.page-header-info {
    min-width: 0;
}

.page-heading {
    display: flex;
    align-items: center;
    gap: 10px;

    margin: 0;

    color: #1f2937;
    font-size: 21px;
    font-weight: 700;
}

.page-heading-icon {
    width: 38px;
    height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 10px;

    background: #eaf7ef;
    color: #198754;

    font-size: 16px;
}

.page-description {
    margin: 6px 0 0 48px;

    color: #9ca3af;

    font-size: 13px;
    line-height: 1.5;
}

.btn-add-category {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    min-height: 40px;

    padding: 9px 16px;

    border-radius: 9px;

    font-size: 13px;
    font-weight: 600;

    white-space: nowrap;
}


/* =========================================================
   ALERT
   ========================================================= */

.custom-alert {
    display: flex;
    align-items: center;
    gap: 9px;

    margin-bottom: 18px;

    border: 0;
    border-radius: 10px;

    font-size: 13px;
}

.custom-alert .btn-close {
    margin-left: auto;
}


/* =========================================================
   DATA CARD
   ========================================================= */

.data-card {
    overflow: hidden;

    background: #fff;

    border: 1px solid #edf0f2;

    border-radius: 14px;

    box-shadow: 0 4px 18px rgba(0, 0, 0, .04);
}

.data-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    min-height: 70px;

    padding: 15px 20px;

    border-bottom: 1px solid #edf0f2;
}

.data-card-title {
    display: flex;
    align-items: center;
    gap: 11px;
}

.data-card-icon {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 9px;

    background: #f1f8f4;
    color: #198754;

    font-size: 14px;
}

.data-card-header h3 {
    margin: 0;

    color: #374151;

    font-size: 15px;
    font-weight: 700;
}

.data-card-header p {
    margin: 3px 0 0;

    color: #9ca3af;

    font-size: 11px;
}

.data-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 6px 11px;

    border-radius: 20px;

    background: #f1f8f4;
    color: #198754;

    font-size: 11px;
    font-weight: 600;

    white-space: nowrap;
}


/* =========================================================
   TABLE
   ========================================================= */

.table-container {
    width: 100%;
}

.custom-table {
    width: 100%;

    margin: 0 !important;
}

.custom-table thead th {
    height: 45px;

    padding: 10px 20px;

    background: #fafbfc;

    color: #6b7280;

    border-bottom: 1px solid #edf0f2;

    font-size: 11px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: .2px;

    vertical-align: middle;
}

.custom-table tbody td {
    height: 60px;

    padding: 10px 20px;

    color: #4b5563;

    border-bottom: 1px solid #f1f2f4;

    font-size: 13px;

    vertical-align: middle;
}

.custom-table tbody tr:last-child td {
    border-bottom: 0;
}

.custom-table tbody tr {
    transition: background .15s ease;
}

.custom-table tbody tr:hover {
    background: #fafdfb;
}

.col-number {
    width: 70px;
}

.col-action {
    width: 190px;
}


/* =========================================================
   NUMBER
   ========================================================= */

.number-badge {
    width: 28px;
    height: 28px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 7px;

    background: #f5f6f7;

    color: #6b7280;

    font-size: 11px;
    font-weight: 600;
}


/* =========================================================
   CATEGORY NAME
   ========================================================= */

.category-name {
    display: flex;
    align-items: center;
    gap: 11px;
}

.category-icon {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 9px;

    background: #fff6e8;
    color: #f59f00;

    font-size: 13px;
}

.category-info {
    display: flex;
    flex-direction: column;

    min-width: 0;
}

.category-title {
    color: #374151;

    font-size: 13px;
    font-weight: 600;

    word-break: break-word;
}

.category-info small {
    margin-top: 2px;

    color: #adb3ba;

    font-size: 10px;
}


/* =========================================================
   ACTION
   ========================================================= */

.category-actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;

    min-width: 66px;

    padding: 6px 9px;

    border: 0;

    border-radius: 7px;

    font-size: 11px;
    font-weight: 600;
}

.btn-edit {
    background: #fff7e6;
    color: #d99000;
}

.btn-edit:hover {
    background: #ffefc7;
    color: #b87900;
}

.btn-delete {
    background: #fff0f0;
    color: #dc3545;
}

.btn-delete:hover {
    background: #ffe0e0;
    color: #b02a37;
}


/* =========================================================
   EMPTY TABLE
   ========================================================= */

.empty-table {
    height: 260px;

    border: 0 !important;

    text-align: center;
}

.empty-table-content {
    display: flex;
    align-items: center;
    justify-content: center;

    flex-direction: column;

    padding: 35px 20px;
}

.empty-icon {
    width: 56px;
    height: 56px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 12px;

    border-radius: 14px;

    background: #f5f6f7;
    color: #b9bec4;

    font-size: 22px;
}

.empty-table-content h4 {
    margin: 0 0 5px;

    color: #6b7280;

    font-size: 14px;
    font-weight: 600;
}

.empty-table-content p {
    margin: 0 0 15px;

    color: #9ca3af;

    font-size: 12px;
}


/* =========================================================
   MODAL
   ========================================================= */

.category-modal {
    overflow: hidden;

    border: 0;

    border-radius: 14px;

    box-shadow: 0 15px 45px rgba(0, 0, 0, .15);
}

.category-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 18px 20px;

    border-bottom: 1px solid #edf0f2;
}

.modal-title-wrapper {
    display: flex;
    align-items: center;
    gap: 11px;
}

.modal-icon {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 10px;

    font-size: 14px;
}

.modal-icon-add {
    background: #eaf7ef;
    color: #198754;
}

.modal-icon-edit {
    background: #fff6e8;
    color: #d99000;
}

.category-modal .modal-title {
    margin: 0;

    color: #1f2937;

    font-size: 16px;
    font-weight: 700;
}

.modal-title-wrapper p {
    margin: 2px 0 0;

    color: #9ca3af;

    font-size: 11px;
}

.category-modal .modal-body {
    padding: 22px 20px;
}

.form-group-custom {
    width: 100%;
}

.form-label {
    margin-bottom: 7px;

    color: #374151;

    font-size: 12px;
    font-weight: 600;
}

.form-control-custom {
    min-height: 42px;

    border: 1px solid #dfe3e7;

    border-radius: 8px;

    font-size: 13px;

    box-shadow: none !important;
}

.form-control-custom:focus {
    border-color: #198754;

    box-shadow: 0 0 0 3px rgba(25, 135, 84, .10) !important;
}

.form-help {
    display: flex;
    align-items: center;
    gap: 5px;

    margin-top: 7px;

    color: #9ca3af;

    font-size: 10px;
}

.category-modal .modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 8px;

    padding: 14px 20px;

    background: #fafbfc;

    border-top: 1px solid #edf0f2;
}

.btn-modal-cancel,
.btn-modal-save {
    min-height: 38px;

    padding: 8px 15px;

    border-radius: 8px;

    font-size: 12px;
    font-weight: 600;
}

.btn-modal-cancel {
    border: 1px solid #e1e4e7;

    background: #fff;

    color: #6b7280;
}

.btn-modal-cancel:hover {
    background: #f5f6f7;
}

.btn-modal-save {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}


/* =========================================================
   RESPONSIVE TABLET
   ========================================================= */

@media (max-width: 991px) {

    .page-header-custom {
        margin-bottom: 18px;
    }

    .data-card-header {
        padding: 14px 16px;
    }

    .custom-table thead th,
    .custom-table tbody td {
        padding-left: 16px;
        padding-right: 16px;
    }

}


/* =========================================================
   RESPONSIVE HP
   ========================================================= */

@media (max-width: 767px) {

    .page-header-custom {
        align-items: stretch;

        flex-direction: column;

        gap: 13px;
    }


    .page-heading {
        font-size: 19px;
    }


    .page-heading-icon {
        width: 35px;
        height: 35px;
    }


    .page-description {
        margin-left: 45px;

        font-size: 11px;
    }


    .btn-add-category {
        width: 100%;
    }


    .data-card {
        border-radius: 11px;
    }


    .data-card-header {
        align-items: flex-start;

        flex-direction: column;

        padding: 14px;
    }


    .data-count {
        align-self: flex-start;
    }


    .table-responsive {
        overflow-x: auto;

        -webkit-overflow-scrolling: touch;
    }


    .custom-table {
        min-width: 620px;
    }


    .custom-table thead th,
    .custom-table tbody td {
        padding-left: 12px;
        padding-right: 12px;
    }


    .category-actions {
        justify-content: flex-start;
    }


    .category-modal {
        margin: 10px;
    }


    .category-modal .modal-header {
        padding: 15px;
    }


    .category-modal .modal-body {
        padding: 18px 15px;
    }


    .category-modal .modal-footer {
        padding: 12px 15px;
    }


    .btn-modal-cancel,
    .btn-modal-save {
        flex: 1;
    }

}


/* =========================================================
   HP KECIL
   ========================================================= */

@media (max-width: 400px) {

    .page-description {
        max-width: 280px;
    }


    .modal-title-wrapper p {
        display: none;
    }


    .modal-icon {
        width: 34px;
        height: 34px;
    }

}

/* =========================
   FILTER KATEGORI
========================= */

.category-filter {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}


/* =========================
   STATUS BADGE
========================= */

.custom-table .badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}


/* =========================
   ACTION BUTTON
========================= */

.btn-activate {
    color: #198754;
    background: #e8f7ef;
    border: 1px solid #c8ead7;
}

.btn-activate:hover {
    color: #fff;
    background: #198754;
    border-color: #198754;
}

.btn-delete {
    color: #dc3545;
    background: #fff0f1;
    border: 1px solid #f5c6cb;
}

.btn-delete:hover {
    color: #fff;
    background: #dc3545;
    border-color: #dc3545;
}


/* =========================
   RESPONSIVE FILTER
========================= */

@media (max-width: 767px) {

    .data-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .category-filter {
        width: 100%;
    }

    .category-filter .btn {
        flex: 1;
    }

}

/* =========================
   PRODUK
========================= */

.product-filter {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.product-category-filter {
    min-width: 180px;
}

.product-category-filter .form-select {
    cursor: pointer;
}

.product-price {
    white-space: nowrap;
    font-size: 14px;
}

.category-label {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    background: #f5f5f5;
    border-radius: 20px;
    font-size: 12px;
    color: #555;
}

.product-icon {
    flex-shrink: 0;
}


/* =========================
   RESPONSIVE PRODUK
========================= */

@media (max-width: 991px) {

    .product-filter {
        width: 100%;
        justify-content: flex-start;
    }

}


@media (max-width: 767px) {

    .product-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .product-filter .btn-group {
        width: 100%;
    }

    .product-filter .btn-group .btn {
        flex: 1;
    }

    .product-category-filter {
        width: 100%;
        min-width: 0;
    }

    .product-category-filter .form-select {
        width: 100%;
    }

}


@media (max-width: 575px) {

    .custom-table {
        min-width: 750px;
    }

    .product-price {
        font-size: 13px;
    }

}

/* =========================
   KASIR - KERANJANG
========================= */

.kasir-page .keranjang-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.kasir-page .keranjang-body {
    padding: 8px;
}

/* Item keranjang dibuat rapat */
.kasir-page .keranjang-item {
    margin-bottom: 4px !important;
    padding: 6px 8px !important;
}

/* Hilangkan jarak antar row */
.kasir-page .keranjang-body .row {
    --bs-gutter-y: 0;
    margin-top: 0;
}

.kasir-page .keranjang-body .mb-2,
.kasir-page .keranjang-body .mb-3 {
    margin-bottom: 4px !important;
}

/* Bagian pembayaran */
.kasir-page .pembayaran {
    padding: 8px;
}

.kasir-page .pembayaran .row {
    --bs-gutter-y: 0;
}

.kasir-page .pembayaran .mb-2,
.kasir-page .pembayaran .mb-3 {
    margin-bottom: 4px !important;
}

/* Label */
.kasir-page .pembayaran label {
    margin-bottom: 2px;
}

/* Input pembayaran */
.kasir-page .pembayaran .form-control,
.kasir-page .pembayaran .form-select {
    min-height: 34px;
    padding: 4px 8px;
}

/* Jarak antar tombol pembayaran */
.kasir-page .payment-methods {
    gap: 5px;
}

.kasir-page .payment-method {
    padding: 7px 8px;
}

/* Area item keranjang bisa menampilkan lebih banyak produk */
.kasir-page .keranjang-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* =========================================================
   TABEL USER - SCROLL HORIZONTAL
========================================================= */

.user-table-responsive {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Lebar minimum tabel agar kolom tidak terlalu sempit */
.user-table-responsive table {
    min-width: 800px;
}

/* Kolom aksi selalu mendatar */
.user-table-responsive th:last-child,
.user-table-responsive td:last-child {
    width: 150px;
    min-width: 150px;
    white-space: nowrap;
    text-align: center;
}

/* Tombol aksi tidak boleh turun */
.user-table-responsive td:last-child .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 2px;
    white-space: nowrap;
}

/* varian di detail_order */
.order-item-variants {
    margin-top: 4px;
    padding-left: 8px;
    font-size: 12px;
    color: #6c757d;
    line-height: 1.5;
}

.order-item-variants i {
    font-size: 5px;
    margin-right: 5px;
    vertical-align: middle;
}