/* ==========================================================
   DATA USER — khusus halaman Master Data
========================================================== */
.aset-user-page {
    --au-blue: #0866d6;
    --au-navy: #122b50;
    --au-muted: #62748b;
    --au-border: #dce7f4;
    color: var(--au-navy);
    min-width: 0;
}

.aset-user-page [hidden] {
    display: none !important;
}

.aset-user-page h1,
.aset-user-page h2,
.aset-user-page p {
    margin: 0;
}

/* HERO DAN STATISTIK */
.aset-user-page .au-hero {
    border: 1px solid var(--au-border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 18px;
    background: linear-gradient(125deg, #f8fbff, #e9f3ff);
}

.aset-user-page .au-breadcrumb,
.aset-user-page .au-heading,
.aset-user-page .au-card-heading,
.aset-user-page .au-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.aset-user-page .au-breadcrumb {
    font-size: 12px;
    color: var(--au-muted);
    margin-bottom: 20px;
    gap: 7px;
}

.aset-user-page .au-breadcrumb a {
    color: var(--au-blue);
    text-decoration: none;
}

.aset-user-page .au-breadcrumb svg,
.aset-user-page .au-button svg {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    flex: 0 0 auto;
}

.aset-user-page .au-heading,
.aset-user-page .au-card-heading {
    justify-content: space-between;
}

.aset-user-page .au-heading small,
.aset-user-page .au-dialog-header small {
    color: var(--au-blue);
    font-size: 11px;
    letter-spacing: 1.2px;
    font-weight: 700;
}

.aset-user-page .au-heading h1 {
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 800;
    margin: 4px 0;
}

.aset-user-page p {
    color: var(--au-muted);
    font-size: 13px;
    line-height: 1.5;
}

.aset-user-page .au-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
}

.aset-user-page .au-kpi {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--au-border);
    border-radius: 12px;
    background: #fff;
}

.aset-user-page .au-kpi span,
.aset-user-page .au-kpi strong {
    display: block;
}

.aset-user-page .au-kpi span {
    font-size: 12px;
}

.aset-user-page .au-kpi strong {
    font-size: 26px;
    line-height: 1.3;
}

.aset-user-page .au-kpi .au-kpi-icon {
    display: grid;
    place-items: center;
    border-radius: 10px;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    background: var(--au-blue);
    color: white;
}

.aset-user-page .au-kpi .au-icon-master {
    background: #7651d4;
}
.aset-user-page .au-kpi .au-icon-user {
    background: #16885e;
}
.aset-user-page .au-kpi .au-icon-viewer {
    background: #d98920;
}

/* TABEL, FILTER DAN TOMBOL */
.aset-user-page .au-card {
    background: #fff;
    padding: 20px;
    border: 1px solid var(--au-border);
    border-radius: 14px;
}

.aset-user-page .au-card h2,
.aset-user-page .au-dialog h2 {
    font-size: 19px;
    font-weight: 750;
    margin-bottom: 4px;
}

.aset-user-page .au-count {
    font-size: 13px;
    color: var(--au-muted);
}

.aset-user-page .au-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.aset-user-page .au-primary {
    color: #fff;
    background: var(--au-blue);
}

.aset-user-page .au-secondary {
    color: #1f5590;
    background: #f3f8ff;
    border-color: var(--au-border);
}

.aset-user-page .au-button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.aset-user-page .au-filters {
    display: grid;
    grid-template-columns: minmax(180px, 2fr) repeat(2, minmax(120px, 1fr)) auto;
    align-items: end;
    gap: 12px;
    margin: 20px 0;
}

.aset-user-page label {
    font-size: 13px;
    font-weight: 600;
}

.aset-user-page input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
.aset-user-page select {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid #c9d9ed;
    border-radius: 7px;
    background: #fff;
    color: var(--au-navy);
    font: inherit;
    font-weight: 400;
    margin-top: 5px;
}

.aset-user-page input:focus-visible,
.aset-user-page button:focus-visible,
.aset-user-page select:focus-visible {
    outline: 2px solid var(--au-blue);
    outline-offset: 2px;
}

.aset-user-page .au-table-wrap {
    overflow: auto;
    border: 1px solid var(--au-border);
    border-radius: 9px;
}

.aset-user-page .au-table {
    border-collapse: collapse;
    width: 100%;
    min-width: 760px;
    font-size: 13px;
}

.aset-user-page .au-table th,
.aset-user-page .au-table td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid var(--au-border);
    vertical-align: middle;
    overflow-wrap: anywhere;
}

.aset-user-page .au-table th {
    background: #eaf3ff;
    font-size: 12px;
    white-space: nowrap;
}

.aset-user-page .au-table tbody tr:nth-child(even) {
    background: #f9fbff;
}

.aset-user-page .au-role,
.aset-user-page .au-status {
    display: inline-block;
    border-radius: 7px;
    padding: 5px 8px;
    font-size: 12px;
    font-weight: 600;
    background: #eef2f6;
    color: #58677a;
}

.aset-user-page .au-role-master {
    background: #f0eaff;
    color: #643bb3;
}
.aset-user-page .au-role-user {
    background: #e5f0ff;
    color: #1458a9;
}
.aset-user-page .au-role-viewer {
    background: #fff1d9;
    color: #905b0d;
}
.aset-user-page .au-status.is-active {
    background: #e0f6e9;
    color: #137546;
}
.aset-user-page .au-empty {
    padding: 30px;
    text-align: center;
    color: var(--au-muted);
}

.aset-user-page .au-footer {
    margin-top: 15px;
    justify-content: flex-end;
    color: var(--au-muted);
    font-size: 12px;
}

.aset-user-page .au-footer > span {
    margin-right: auto;
}
.aset-user-page .au-footer select {
    display: inline-block;
    width: auto;
    margin: 0 0 0 6px;
}

/* DIALOG TAMBAH / EDIT */
.aset-user-page .au-dialog {
    width: min(680px, calc(100vw - 24px));
    max-height: 92vh;
    border: 0;
    border-radius: 16px;
    padding: 0;
    color: var(--au-navy);
    box-shadow: 0 20px 70px #112d5940;
}

.aset-user-page .au-dialog::backdrop {
    background: #0c214f80;
}
.aset-user-page .au-dialog form {
    display: flex;
    flex-direction: column;
    max-height: 92vh;
}

.aset-user-page .au-dialog-header,
.aset-user-page .au-dialog-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--au-border);
    background: #fff;
}

.aset-user-page .au-dialog-body {
    padding: 20px 22px;
    overflow: auto;
    min-height: 0;
    display: grid;
    gap: 16px;
}

.aset-user-page .au-dialog-footer {
    justify-content: flex-end;
    border-bottom: 0;
    border-top: 1px solid var(--au-border);
}

.aset-user-page .au-fields,
.aset-user-page .au-module-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 12px 0;
}

.aset-user-page .au-fieldset {
    border: 0;
    padding: 0;
    margin: 0;
    min-width: 0;
}
.aset-user-page .au-fieldset legend {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}
.aset-user-page .au-role-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.aset-user-page .au-role-options label,
.aset-user-page .au-module,
.aset-user-page .au-check {
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--au-border);
    border-radius: 8px;
    padding: 10px;
}

.aset-user-page input[type=checkbox],
.aset-user-page input[type=radio] {
    accent-color: var(--au-blue);
    flex: 0 0 auto;
}
.aset-user-page .au-module small {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: var(--au-muted);
}
.aset-user-page .au-note,
.aset-user-page .au-preview {
    background: #eef5ff;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
}
.aset-user-page .au-note span,
.aset-user-page .au-note small,
.aset-user-page .au-preview small {
    display: block;
    overflow-wrap: anywhere;
}
.aset-user-page .au-preview strong {
    display: block;
    margin-top: 3px;
    color: var(--au-blue);
}
.aset-user-page .au-alert {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 13px;
}
.aset-user-page .au-alert ul {
    margin-bottom: 0;
}
.aset-user-page .au-success {
    background: #e3f7e9;
    color: #14683f;
}
.aset-user-page .au-error {
    background: #fff0ee;
    color: #a72828;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
    .aset-user-page .au-kpis,
    .aset-user-page .au-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 580px) {
    .aset-user-page .au-hero,
    .aset-user-page .au-card {
        padding: 14px;
    }
    .aset-user-page .au-kpi {
        padding: 10px;
        gap: 8px;
    }
    .aset-user-page .au-kpi .au-kpi-icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }
    .aset-user-page .au-filters,
    .aset-user-page .au-fields,
    .aset-user-page .au-module-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .aset-user-page .au-dialog-body {
        padding: 14px;
    }
    .aset-user-page .au-dialog-header,
    .aset-user-page .au-dialog-footer {
        padding: 14px;
    }
}

/* Organization and one-time PIN administration. */
.aset-user-page .au-org-sub {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
    white-space: normal;
}

.aset-user-page .au-pin-status {
    display: block;
    font-weight: 650;
}

.aset-user-page .au-pin-action {
    margin-top: 6px;
    min-height: 30px;
    padding: 5px 9px;
    font-size: 12px;
}

.au-token-page {
    min-height: 100vh;
    margin: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    box-sizing: border-box;
    background: #edf4fb;
    font: 15px/1.65 system-ui, sans-serif;
    color: #153354;
}

.au-token-card {
    width: min(100%, 560px);
    box-sizing: border-box;
    padding: clamp(20px, 5vw, 40px);
    background: #fff;
    border: 1px solid #d5e4f3;
    border-radius: 18px;
    box-shadow: 0 10px 36px #14335415;
}

.au-token-eyebrow {
    color: #0968d8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
}

.au-token-value {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid #b4cde9;
    border-radius: 8px;
    color: #153354;
    background: #f5f9ff;
    font: 14px monospace;
}

.au-token-back {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 18px;
    border-radius: 8px;
    color: #fff;
    background: #0968d8;
    text-decoration: none;
}

/* Three-tab account editor; keep all business fields in the same form. */
.aset-user-page .au-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 12px 22px;
    border-bottom: 1px solid var(--au-border);
    background: #f5f8fc;
}

.aset-user-page .au-tabs button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 8px 6px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: var(--au-muted);
    font: inherit;
    font-weight: 650;
    cursor: pointer;
}

.aset-user-page .au-tabs button[aria-selected="true"] {
    border-color: #c5dbf5;
    color: var(--au-blue);
    background: #fff;
    box-shadow: 0 2px 5px #1433540a;
}

.aset-user-page .au-tabs button svg {
    width: 16px;
    height: 16px;
    flex: none;
}

.aset-user-page .au-tab-panel {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.aset-user-page .au-tab-panel[hidden],
.aset-user-page .au-tabs [hidden],
.aset-user-page .au-security-card [hidden],
.aset-user-page #auOwnProfile[hidden],
.aset-user-page #auSave[hidden] {
    display: none !important;
}

.aset-user-page .au-security-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--au-border);
    border-radius: 12px;
    background: #fff;
}

.aset-user-page .au-security-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}

.aset-user-page .au-security-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 10px;
    background: #e7f1ff;
    color: var(--au-blue);
}

.aset-user-page .au-security-heading h3,
.aset-user-page .au-security-heading p,
.aset-user-page .au-security-note {
    margin: 0;
}

.aset-user-page .au-security-heading h3 {
    font-size: 14px;
    font-weight: 700;
}

.aset-user-page .au-security-heading p,
.aset-user-page .au-security-note {
    color: var(--au-muted);
    font-size: 12px;
    line-height: 1.6;
}

.aset-user-page .au-security-card .au-button {
    justify-self: start;
}

.au-reset-form {
    display: grid;
    gap: 14px;
    margin: 20px 0;
}

.au-reset-form label {
    display: grid;
    gap: 5px;
    font-size: 14px;
    font-weight: 600;
}

.au-reset-form input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #b4cde9;
    border-radius: 8px;
    padding: 12px;
    font: inherit;
}

.au-reset-form button {
    border: 0;
    font: inherit;
    cursor: pointer;
}

.au-reset-error {
    color: #9f1239;
    background: #fff1f2;
    padding: 12px;
    border-radius: 8px;
}

@media (max-width: 480px) {
    .aset-user-page .au-tabs {
        padding: 8px 12px;
    }

    .aset-user-page .au-tabs button {
        font-size: 12px;
        gap: 4px;
    }

    .aset-user-page .au-tabs button svg {
        width: 13px;
        height: 13px;
    }
}