﻿tambahkan css ini untuk grid tadi.
/* ========================================= */
/* RESET */
/* ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

body {
    background: #f4f6f9;
    overflow: hidden;
}
.icon-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 16px;
    margin-top: 20px;
    height:80vh;
    overflow:auto;
}

.icon-card {
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    background: #fff;
}

.icon-box {
    width: 48px;
    height: 48px;
    margin: 0 auto 10px auto;
}

.icon-preview {
    width: 48px;
    height: 48px;
    background-color: #333; /* warna icon */
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.icon-name {
    font-size: 12px;
    color: #666;
    word-break: break-all;
}
/* ========================================= */
/* LAYOUT STRUCTURE */
/* ========================================= */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* ========================================= */
/* TOPBAR (FULL WIDTH) */
/* ========================================= */
.topbar {
    height: 65px;
    width: 100%;
    background: linear-gradient(90deg, #1f2937, #111827);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    z-index: 1000;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.burger {
    font-size: 22px;
    cursor: pointer;
}

.tenant-name {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* User Info */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #d1d5db;
}

/* ========================================= */
/* BODY SECTION */
/* ========================================= */
.body-container {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* ========================================= */
/* SIDEBAR MODERN */
/* ========================================= */
/* SIDEBAR CONTAINER */
.sidebar {
    width: 260px;
    background: linear-gradient(135deg, #1e3c72, #2a5298) !important;
    padding: 20px 12px;
    border-top-right-radius: 24px;
    border-bottom-right-radius: 24px;
    height: 100vh;
    overflow-y: auto;
    transition: all 0.3s ease;
    display: block;
}


    .sidebar.mobile-open {
        left: 0;
    }

    .sidebar.collapsed {
        display: none !important;
        overflow: hidden;
    }
/* MAIN MENU */
.menu-item {
    margin-bottom: 8px;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 14px;
    color: #e2e8f0;
    cursor: pointer;
    transition: 0.3s;
}

    .menu-link:hover {
        background: rgba(255,255,255,0.06);
    }

    .menu-link .icon {
        width: 28px;
    }

    .menu-link .title {
        flex: 1;
        margin-left: 10px;
    }

    .menu-link .arrow {
        width: 24px;
        text-align: right;
    }


/* ARROW */
.arrow {
    font-size: 20px;
    font-weight: bold;
    transition: 0.3s;
}

/* SUBMENU */
.submenu {
    margin-top: 6px;
    padding-left: 14px;
    display: none;
    color: #cbd5e1;
}

/* SUBMENU ITEM */
.submenu-item {
    margin-bottom: 6px;
}

/* SUBMENU LINK */
.submenu-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 14px;
    color: #cbd5e1;
    cursor: pointer;
    transition: 0.3s;
}

    .submenu-link:hover {
        background: rgba(255,255,255,0.06);
    }

/* SUB SUB MENU */
.sub-submenu {
    display: none;
    margin-top: 4px;
    padding-left: 14px;
}

    .sub-submenu a {
        display: block;
        padding: 6px 10px;
        border-radius: 10px;
        font-size: 13px;
        color: #94a3b8;
        text-decoration: none;
        transition: 0.3s;
    }

        .sub-submenu a:hover {
            background: rgba(255,255,255,0.05);
            color: #ffffff;
        }

/* ACTIVE STATE */
.menu-item.active > .submenu {
    display: block;
}

.submenu-item.active > .sub-submenu {
    display: block;
}

/* ROTATE ARROW */
.menu-item.active > .menu-link .arrow, .menu-item.active > .menu-link-haschild .arrow,
.submenu-item.active > .submenu-link .arrow {
    transform: rotate(90deg);
}
/* ========================================= */
/* MAIN CONTENT */
/* ========================================= */
.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

/* ========================================= */
/* CARD */
/* ========================================= */
.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-card {
    background: #fff;
    padding: 22px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
}

/* ========================================= */
/* RESPONSIVE */
/* ========================================= */

/* Laptop */
@media (max-width: 1440px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* MOBILE */
@media (max-width: 768px) {

    .sidebar {
        position: fixed;
        left: 0;
        top: 65px;
        height: calc(100% - 65px);
        z-index: 2000;
        border-radius: 0 25px 25px 0;
    }

        .sidebar.mobile-open {
            left: 0;
        }

        .sidebar.collapsed {
            width: 260px;
        }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .tenant-name {
        font-size: 14px;
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* ========================================= */
/* SETTINGS PAGE */
/* ========================================= */

.settings-page {
    background: #fff;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    height: 88vh;
    display: flex;
    flex-direction: column;
}

.page-title {
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
}

.settings-tabs {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    color: #64748b;
    transition: 0.3s;
}

    .tab-btn:hover {
        background: #f1f5f9;
    }

    .tab-btn.active {
        background: linear-gradient(90deg, #6366f1, #8b5cf6);
        color: white;
        box-shadow: 0 5px 15px rgba(99,102,241,0.3);
    }

.settings-content {
    flex: 1; 
    overflow-y: auto; 
    max-height: calc(88vh - 120px); 
    padding-right: 10px; 
}

/* ========================================= */
/* IAM DATAGRID */
/* ========================================= */

.iam-datagrid {
    background: #ffffff;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    position: relative;
}

    /* LOADING OVERLAY */
    .iam-datagrid .iam-loader {
        position: absolute;
        top: 10px;
        right: 10px;
    }

    /* TOOLBAR */
    .iam-datagrid .grid-toolbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 15px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .iam-datagrid .toolbar-left {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .iam-datagrid .toolbar-right {
        display: flex;
        gap: 10px;
    }

/* TABLE */
.
le {
    width: 100%;
    border-collapse: collapse;
    border-radius: 12px;
    overflow: hidden;
}

    .iam-table thead {
        background: #f8fafc;
    }

    .iam-table th {
        text-align: left;
        padding: 12px 14px;
        font-size: 13px;
        font-weight: 600;
        color: #374151;
        border-bottom: 1px solid #e5e7eb;
    }

    .iam-table td {
        padding: 12px 14px;
        border-bottom: 1px solid #f1f5f9;
        font-size: 14px;
        color: #444;
    }

    .iam-table tbody tr {
        transition: 0.2s;
    }

        .iam-table tbody tr:hover {
            background: #f9fafb;
        }

    /* EMPTY STATE */
    .iam-table .text-center {
        padding: 20px;
        color: #9ca3af;
    }

/* PAGINATION */
.grid-footer {
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

    /* SELECT */
    .grid-footer select {
        padding: 6px 10px;
        border-radius: 8px;
        border: 1px solid #e5e7eb;
    }

/* PAGINATION BUTTON */
.pagination {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .pagination button {
        border: none;
        padding: 6px 12px;
        border-radius: 8px;
        background: #f3f4f6;
        cursor: pointer;
        transition: 0.2s;
    }

        .pagination button:hover:not(:disabled) {
            background: #e5e7eb;
        }

        .pagination button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

    /* PAGE TEXT */
    .pagination span {
        font-size: 13px;
        color: #555;
    }

/* RESPONSIVE */
@media (max-width: 768px) {

    .iam-datagrid .grid-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .iam-datagrid .toolbar-left,
    .iam-datagrid .toolbar-right {
        width: 100%;
        justify-content: space-between;
    }

    .grid-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ========================================= */
/* FORM CARD */
/* ========================================= */

.form-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.form-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* GRID */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* FULL WIDTH */
.full-width {
    grid-column: span 2;
}



/* INPUT */
.form-input {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    font-size: 14px;
    transition: 0.3s;
}

    .form-input:focus {
        outline: none;
        border-color: #6366f1;
        box-shadow: 0 0 0 3px rgba(99,102,241,0.2);
    }

/* SWITCH */
.switch-group {
    justify-content: center;
}

/* BUTTONS */
.action-buttons-group {
    display: inline-flex !important;
    gap: 6px;
    align-items: center;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 30px;
}

.btn-primary {
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: 0.3s;
}

    .btn-primary:hover {
        opacity: 0.9;
    }

.btn-secondary {
    background: #f3f4f6;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
}

.btn-submit {
    background: #2784F5 !important;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
}

.btn-danger {
    background: #F54927 !important;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
}

.grid-toolbar-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 5px;
}

/*.toolbar-left {
    width: 250px;
}*/
.toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px; /* jarak antar komponen */
}

    .toolbar-left .e-input {
        width: 250px !important; /* atur lebar search */
    }

.toolbar-right {
    display: flex;
    justify-content: flex-end;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .full-width {
        grid-column: span 1;
    }
}

/* ========================================= */
/* GRID CARD */
/* ========================================= */

.grid-card {
    background: #ffffff;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* HEADER */
.grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

    .grid-header h3 {
        font-size: 18px;
        font-weight: 600;
    }

/* TOOLBAR */
.grid-toolbar {
    margin-bottom: 15px;
}

.grid-search {
    width: 250px;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

/* TABLE */
.e-grid .e-headercell {
    background: #f8fafc !important;
    border-bottom: solid 1px gray !important;
}

/* STATUS BADGE */
.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

    .status-badge.active {
        background: #dcfce7;
        color: #16a34a;
    }

    .status-badge.inactive {
        background: #fee2e2;
        color: #dc2626;
    }

/* ACTION BUTTON */
.action-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    margin: 0 4px;
}

    .action-btn.edit:hover {
        color: #2563eb;
    }

    .action-btn.delete:hover {
        color: #dc2626;
    }

.text-center {
    text-align: center;
}
/* Overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    animation: fadeIn 0.2s ease-in-out;
}

/* Container */
.modal-container {
    background: white;
    width: 500px;
    max-width: 95%;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    animation: slideUp 0.25s ease;
}

/* Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 0px 20px;
    border-bottom: 0px none !important;
}

.modal-close {
    border: none;
    background: none;
    font-size: 18px;
    cursor: pointer;
}

/* Body */
.modal-body {
    padding: 20px 25px;
}


/* Footer */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 25px 20px;
}

/* Buttons */
.btn-primary {
    background: #6366f1;
    color: white;
    padding: 8px 18px;
    border-radius: 8px;
    border: none;
}

.btn-secondary {
    background: #e5e7eb;
    padding: 8px 18px;
    border-radius: 8px;
    border: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

:root {
    --level-1: #8dccad;
    --level-2: #f5cc7f;
    --level-3: #7b9fe0;
    --level-4: #f27c8d;
    --black: #2d3748;
}

.tree-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
}

ol {
    list-style: none;
    padding-left: 0;
}

.container-diagram {
    max-width: 100%;
    margin: 50px auto;
}

.rectangle {
    position: relative;
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* LEVEL 1 */
.level-1 {
    width: 20%;
    margin: 0 auto 40px;
    background: var(--level-1);
    text-align: center;
}

    .level-1::before {
        content: "";
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        width: 2px;
        height: 20px;
        background: var(--black);
    }

/* LEVEL 2 */
.level-2-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    position: relative;
    text-align: center;
}

    .level-2-wrapper::before {
        content: "";
        position: absolute;
        top: -20px;
        left: 25%;
        width: 50%;
        height: 2px;
        background: var(--black);
    }

    .level-2-wrapper > li::before {
        content: "";
        position: absolute;
        top: -20px;
        left: 50%;
        transform: translateX(-50%);
        width: 2px;
        height: 20px;
        background: var(--black);
    }

.level-2 {
    width: 70%;
    margin: 0 auto 40px;
    background: var(--level-2);
}

/* LEVEL 3 */
.level-3-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-column-gap: 20px;
    width: 90%;
    margin: 0 auto;
    position: relative;
    text-align: center;
}

    .level-3-wrapper::before {
        content: "";
        position: absolute;
        top: -20px;
        left: 25%;
        width: 50%;
        height: 2px;
        background: var(--black);
    }

    .level-3-wrapper > li::before {
        content: "";
        position: absolute;
        top: -20px;
        left: 50%;
        transform: translateX(-50%);
        width: 2px;
        height: 20px;
        background: var(--black);
    }

.level-3 {
    margin-bottom: 20px;
    background: var(--level-3);
}

/* LEVEL 4 */
.level-4-wrapper {
    width: 80%;
    margin-left: auto;
    position: relative;
    text-align: center;
}

    .level-4-wrapper::before {
        content: "";
        position: absolute;
        top: -20px;
        left: -20px;
        width: 2px;
        height: calc(100% + 20px);
        background: var(--black);
    }

    .level-4-wrapper li + li {
        margin-top: 20px;
    }

.level-4 {
    margin-bottom: 20px;
    background: var(--level-4);
}

    .level-4::before {
        content: "";
        position: absolute;
        top: 50%;
        left: -20px;
        transform: translateY(-50%);
        width: 20px;
        height: 2px;
        background: var(--black);
    }

/* Overlay */
.dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

/* Box */
.dialog-box {
    background: white;
    width: 420px;
    max-width: 95%;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
    animation: popupScale 0.2s ease;
}
/* Default */
.dialog-normal .e-dlg-header-content {
    background-color: #3f51b5;
    color: white;
}

/* Error */
.dialog-error .e-dlg-header-content {
    background-color: #F54927;
    color: #fff !important;
}

    .dialog-error .e-dlg-header-content span {
        color: #fff !important;
    }
/* Header */
.dialog-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.dialog-icon {
    font-size: 24px;
}

/* Types */
.dialog-box.success .dialog-icon {
    color: #22c55e;
}

.dialog-box.error .dialog-icon {
    color: #ef4444;
}

.dialog-box.warning .dialog-icon {
    color: #f59e0b;
}

.dialog-box.info .dialog-icon {
    color: #3b82f6;
}

/* Body */
.dialog-body {
    margin-bottom: 20px;
    color: #444;
}

/* Footer */
.dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Animation */
@keyframes popupScale {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.upload-container {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s ease;
    background: #fafafa;
}

    .upload-container:hover {
        border-color: #2563eb;
        background: #f0f7ff;
    }

.upload-content p {
    margin: 0;
    font-size: 14px;
    color: #555;
}

.upload-content span {
    color: #2563eb;
    font-weight: 500;
}

.upload-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.file-selected {
    color: #16a34a;
    font-weight: 600;
}

.hidden-file-input {
    display: none;
}

.gateway-dialog .e-dlg-content {
    max-height: 75vh;
    overflow-y: auto;
}

.modal-body-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
}



.shift-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1.3fr;
    gap: 20px;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}



.form-input {
    padding: 6px;
}

.checkbox-row {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}
.label-catatan-red{
    font-size:10px;
    color:red;
}
.days-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.day-item {
    display: flex;
    gap: 6px;
    align-items: center;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-footer {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-primary {
    padding: 8px 16px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
}

hr {
    margin: 20px 0;
}

/* Responsive */
@media (max-width: 1100px) {
    .shift-container {
        grid-template-columns: 1fr;
    }
}
