/* =========================================================
   GLOBAL
   ========================================================= */

:root {

    --app-primary: #1f2937;
    --app-primary-hover: #374151;

    --app-background: #f5f7fa;

    --app-border: #e5e7eb;

    --app-text: #212529;
    --app-text-muted: #6b7280;

    --app-white: #ffffff;

    --app-radius: 8px;

    --app-navbar-height: 60px;

}


html {
    font-size: 15px;
}


body {

    margin: 0;

    background-color: var(--app-background);

    color: var(--app-text);

    font-family:
        system-ui,
        -apple-system,
        "Segoe UI",
        Roboto,
        "Helvetica Neue",
        Arial,
        sans-serif;

}


/* =========================================================
   NAVBAR
   ========================================================= */

.app-navbar {

    min-height: var(--app-navbar-height);

    background-color: var(--app-primary);

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.08);

}


.app-navbar .navbar-brand {

    display: flex;

    align-items: center;

    color: var(--app-white);

    font-size: 1rem;

    font-weight: 600;

    letter-spacing: 0.15px;

    white-space: nowrap;

}


.app-navbar .navbar-brand:hover {

    color: var(--app-white);

}


.app-navbar .navbar-brand i {

    font-size: 1.05rem;

}


/* =========================================================
   NAVIGATION LINK
   ========================================================= */

.app-navbar .nav-link {

    display: flex;

    align-items: center;

    color: rgba(255, 255, 255, 0.82);

    font-size: 0.9rem;

    font-weight: 400;

    padding:
        0.7rem
        0.8rem;

    border-radius: 6px;

    transition:
        background-color 0.15s ease,
        color 0.15s ease;

}


.app-navbar .nav-link:hover {

    color: var(--app-white);

    background-color:
        rgba(255, 255, 255, 0.08);

}


.app-navbar .nav-link.active {

    color: var(--app-white);

    background-color:
        rgba(255, 255, 255, 0.12);

    font-weight: 600;

}


/* =========================================================
   DROPDOWN
   ========================================================= */

.app-navbar .dropdown-menu {

    min-width: 190px;

    margin-top: 0.35rem;

    padding: 0.4rem;

    background-color: var(--app-white);

    border: 1px solid var(--app-border);

    border-radius: var(--app-radius);

    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.12);

}


.app-navbar .dropdown-item {

    padding:
        0.55rem
        0.75rem;

    color: var(--app-text);

    font-size: 0.9rem;

    border-radius: 6px;

    transition:
        background-color 0.15s ease,
        color 0.15s ease;

}


.app-navbar .dropdown-item:hover {

    background-color: #f1f3f5;

    color: var(--app-text);

}


.app-navbar .dropdown-item.active {

    background-color: #e9ecef;

    color: var(--app-text);

    font-weight: 600;

}


/* =========================================================
   USER
   ========================================================= */

.app-user-name {

    display: flex;

    align-items: center;

    color:
        rgba(255, 255, 255, 0.9);

    font-size: 0.88rem;

    padding:
        0.5rem
        0.75rem;

    white-space: nowrap;

}


.app-user-name i {

    font-size: 1rem;

}


.app-logout {

    margin-left: 0.15rem;

}


/* =========================================================
   MOBILE TOGGLE
   ========================================================= */

.app-navbar .navbar-toggler {

    border-color:
        rgba(255, 255, 255, 0.25);

}


.app-navbar .navbar-toggler:focus {

    box-shadow:
        0 0 0 0.15rem
        rgba(255, 255, 255, 0.15);

}


/* =========================================================
   MAIN CONTENT
   ========================================================= */

.app-main {

    min-height:
        calc(100vh - var(--app-navbar-height));

    padding-top: 24px;

    padding-bottom: 40px;

}


/* =========================================================
   FLASH MESSAGE
   ========================================================= */

.app-flash-container {

    margin-bottom: 20px;

}


.app-flash-container .alert {

    margin-bottom: 10px;

    border-radius: var(--app-radius);

}


/* =========================================================
   COMMON PAGE
   ========================================================= */

.page-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    margin-bottom: 20px;

}


.page-title {

    margin: 0;

    font-size: 1.35rem;

    font-weight: 600;

    color: var(--app-text);

}


.page-subtitle {

    margin-top: 4px;

    color: var(--app-text-muted);

    font-size: 0.88rem;

}


/* =========================================================
   CARD
   ========================================================= */

.app-card {

    background-color: var(--app-white);

    border:
        1px solid var(--app-border);

    border-radius:
        var(--app-radius);

    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.04);

}


.app-card-header {

    padding:
        15px 18px;

    border-bottom:
        1px solid var(--app-border);

    font-weight: 600;

}


.app-card-body {

    padding: 18px;

}


/* =========================================================
   TABLE
   ========================================================= */

.app-table-wrapper {

    width: 100%;

    overflow-x: auto;

}


.app-table {

    margin-bottom: 0;

    vertical-align: middle;

}


.app-table th {

    background-color: #f8f9fa;

    color: #495057;

    font-size: 0.85rem;

    font-weight: 600;

    white-space: nowrap;

    border-bottom:
        1px solid var(--app-border);

}


.app-table td {

    font-size: 0.88rem;

}


.app-table tbody tr:hover {

    background-color: #f8f9fa;

}


/* =========================================================
   FORM
   ========================================================= */

.form-label {

    font-size: 0.88rem;

    font-weight: 500;

    margin-bottom: 6px;

}


.form-control,
.form-select {

    border-color:
        #d9dee5;

    border-radius: 6px;

    font-size: 0.9rem;

    min-height: 38px;

}


.form-control:focus,
.form-select:focus {

    border-color:
        #86b7fe;

    box-shadow:
        0 0 0 0.15rem
        rgba(13, 110, 253, 0.12);

}


/* =========================================================
   BUTTON
   ========================================================= */

.btn {

    border-radius: 6px;

    font-size: 0.88rem;

    font-weight: 500;

}


.btn-sm {

    font-size: 0.82rem;

}


.btn i {

    margin-right: 3px;

}


/* =========================================================
   BADGE
   ========================================================= */

.badge {

    font-weight: 500;

    border-radius: 5px;

}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 991.98px) {


    .app-navbar .navbar-nav {

        padding-top: 5px;

        padding-bottom: 5px;

    }


    .app-navbar .nav-link {

        padding:
            0.6rem
            0.75rem;

    }


    .app-navbar .dropdown-menu {

        margin-top: 0;

        border: 0;

        box-shadow: none;

        background-color:
            rgba(255, 255, 255, 0.04);

    }


    .app-navbar .dropdown-item {

        color:
            rgba(255, 255, 255, 0.82);

    }


    .app-navbar .dropdown-item:hover {

        color: var(--app-text);

    }


    .app-user-name {
        display: flex;
        align-items: center;

        color: rgba(255, 255, 255, 0.9);

        font-size: 0.88rem;

        padding: 0.5rem 0.75rem;

        white-space: nowrap;

        text-decoration: none;
    }

    .app-user-name:hover {
        color: #ffffff;
        background-color: rgba(255, 255, 255, 0.08);
    }


    .app-logout {

        margin-left: 0;

    }


    .page-header {

        align-items: flex-start;

        flex-direction: column;

    }

}


@media (max-width: 575.98px) {


    html {

        font-size: 14px;

    }


    .app-navbar .navbar-brand span {

        max-width: 220px;

        overflow: hidden;

        text-overflow: ellipsis;

    }


    .app-main {

        padding-top: 16px;

    }


    .app-card-body {

        padding: 14px;

    }


}


/* =========================================================
   LOGIN
   ========================================================= */

.login-page {

    min-height:
        calc(100vh - var(--app-navbar-height));

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 30px 15px;

}


.login-card {

    width: 100%;

    max-width: 420px;

    background-color: var(--app-white);

    border: 1px solid var(--app-border);

    border-radius: 12px;

    padding: 32px;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.08);

}


/* LOGIN HEADER */

.login-header {

    text-align: center;

    margin-bottom: 28px;

}


.login-icon {

    width: 56px;

    height: 56px;

    margin: 0 auto 15px;

    display: flex;

    align-items: center;

    justify-content: center;

    background-color: var(--app-primary);

    color: var(--app-white);

    border-radius: 12px;

    font-size: 1.4rem;

}


.login-header h1 {

    margin: 0;

    font-size: 1.25rem;

    font-weight: 600;

}


.login-header p {

    margin: 7px 0 0;

    color: var(--app-text-muted);

    font-size: 0.88rem;

}


/* LOGIN ALERT */

.login-alert {

    font-size: 0.88rem;

    margin-bottom: 20px;

}


/* INPUT */

.login-card .input-group-text {

    background-color: #f8f9fa;

    border-color: #d9dee5;

    color: var(--app-text-muted);

}


.login-card .form-control {

    min-height: 42px;

}


.login-card .form-control:focus {

    box-shadow:
        0 0 0 0.15rem
        rgba(13, 110, 253, 0.12);

}


/* PASSWORD TOGGLE */

.login-password-toggle {

    min-width: 44px;

}


/* LOGIN BUTTON */

.login-button {

    min-height: 42px;

    font-weight: 500;

}


/* LOGIN FOOTER */

.login-footer {

    margin-top: 25px;

    padding-top: 18px;

    border-top: 1px solid var(--app-border);

    text-align: center;

    color: var(--app-text-muted);

    font-size: 0.75rem;

}


/* MOBILE */

@media (max-width: 575.98px) {

    .login-page {

        padding: 20px 12px;

    }

    .login-card {

        padding: 25px 20px;

        border-radius: 10px;

    }

}

/* =========================================================
   DASHBOARD
   ========================================================= */

.dashboard-card {

    display: flex;

    align-items: center;

    gap: 15px;

    min-height: 110px;

    padding: 18px;

    background-color: var(--app-white);

    border: 1px solid var(--app-border);

    border-radius: var(--app-radius);

    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.04);

}


.dashboard-card-icon {

    width: 48px;

    height: 48px;

    flex-shrink: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    background-color: #f1f3f5;

    color: var(--app-primary);

    border-radius: 10px;

    font-size: 1.25rem;

}


.dashboard-card-content {

    min-width: 0;

}


.dashboard-card-label {

    color: var(--app-text-muted);

    font-size: 0.82rem;

    margin-bottom: 4px;

}


.dashboard-card-value {

    font-size: 1.35rem;

    font-weight: 600;

    color: var(--app-text);

}


/* EMPTY STATE */

.dashboard-empty {

    min-height: 220px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 10px;

    color: var(--app-text-muted);

    text-align: center;

}


.dashboard-empty i {

    font-size: 2rem;

}


/* QUICK MENU */

.dashboard-quick-menu {

    display: flex;

    flex-direction: column;

    gap: 6px;

}


.dashboard-quick-item {

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 10px 12px;

    color: var(--app-text);

    text-decoration: none;

    border-radius: 6px;

    font-size: 0.88rem;

}


.dashboard-quick-item:hover {

    background-color: #f1f3f5;

    color: var(--app-text);

}


.dashboard-quick-item i {

    color: var(--app-text-muted);

}

/* =========================================================
   LIST PAGE
   ========================================================= */

.list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.list-toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.list-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.list-search {
    width: 260px;
}

.list-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--app-text-muted);
}

.list-empty i {
    display: block;
    font-size: 2rem;
    margin-bottom: 8px;
}

.table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    white-space: nowrap;
}

.table-actions .btn {
    min-width: 34px;
}

.status-badge {
    min-width: 70px;
    text-align: center;
}

/* 
  RESPONSIVE
 */

 @media (max-width: 767.98px) {

    .list-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .list-toolbar-left,
    .list-toolbar-right {
        width: 100%;
    }

    .list-toolbar-right {
        justify-content: flex-start;
    }

    .list-search {
        width: 100%;
    }

}

/* =========================================================
   FORM PAGE
   ========================================================= */

.form-actions {

    display: flex;

    justify-content: flex-end;

    align-items: center;

    gap: 8px;

    margin-top: 24px;

    padding-top: 18px;

    border-top: 1px solid var(--app-border);

}


/* =========================================================
   FORM REQUIRED
   ========================================================= */

.form-label .text-danger {

    font-size: 0.8rem;

}


/* =========================================================
   FORM MOBILE
   ========================================================= */

@media (max-width: 575.98px) {

    .form-actions {

        flex-direction: column-reverse;

        align-items: stretch;

    }

    .form-actions .btn {

        width: 100%;

    }

}

/* =========================================================
   BUTTON STANDARD
   ========================================================= */

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn-action {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-action i {
    margin: 0;
}


/* =========================================================
   PERMISSION / ROLE CHECKBOX
   ========================================================= */

.access-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.access-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--app-border);
    border-radius: 6px;
    background-color: var(--app-white);
}

.access-item:hover {
    background-color: #f8f9fa;
}

.access-item .form-check-input {
    margin-top: 0;
}

.access-item-label {
    margin: 0;
    cursor: pointer;
    flex: 1;
}

.access-code {
    color: var(--app-text-muted);
    font-size: 0.8rem;
}


/* TABLE UNTUK MOBILE */

@media (max-width: 767.98px) {

    .app-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .app-table {
        min-width: 800px;
    }

    .table-actions {
        justify-content: flex-start;
    }

}