/* TEMPOTOTO Admin Account Client V2 */
body.ttac-open {
    overflow: hidden !important;
}

.ttac-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(2, 4, 10, 0.82);
    backdrop-filter: blur(12px);
}

.ttac-panel {
    width: min(1480px, 96vw);
    max-height: 92vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(64, 190, 255, 0.42);
    border-radius: 26px;
    background: linear-gradient(145deg, rgba(16, 20, 32, 0.99), rgba(8, 11, 20, 0.99));
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.62), 0 0 36px rgba(47, 174, 255, 0.1);
    color: #f8fafc;
    font-family: inherit;
}

.ttac-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 32px 24px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.ttac-kicker {
    display: block;
    margin-bottom: 7px;
    color: #55c7ff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 2.2px;
}

.ttac-header h2 {
    margin: 0;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.06;
    color: #ffffff;
}

.ttac-header p {
    margin: 10px 0 0;
    color: #98a2b3;
    font-size: 15px;
    line-height: 1.55;
}

.ttac-close {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 15px;
    background: #1a1f2c;
    color: #ffffff;
    font-size: 31px;
    line-height: 1;
    cursor: pointer;
}

.ttac-close:hover {
    background: #292f3e;
}

.ttac-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    padding: 20px 32px 0;
}

.ttac-stats article {
    min-height: 92px;
    padding: 17px 20px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 17px;
    background: rgba(27, 32, 45, 0.78);
}

.ttac-stats span {
    display: block;
    margin-bottom: 7px;
    color: #98a2b3;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.ttac-stats strong {
    color: #4fc3ff;
    font-size: 30px;
    line-height: 1;
}

.ttac-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 180px 180px auto auto;
    gap: 12px;
    padding: 18px 32px 12px;
}

.ttac-toolbar input,
.ttac-toolbar select,
.ttac-swal-form input,
.ttac-swal-form select {
    width: 100%;
    min-height: 50px;
    box-sizing: border-box;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 13px;
    background: #171c28;
    color: #ffffff;
    padding: 0 15px;
    font-size: 15px;
    outline: none;
}

.ttac-toolbar input:focus,
.ttac-toolbar select:focus,
.ttac-swal-form input:focus,
.ttac-swal-form select:focus {
    border-color: #4fc3ff;
    box-shadow: 0 0 0 3px rgba(79, 195, 255, 0.12);
}

.ttac-btn {
    min-height: 50px;
    border: 0;
    border-radius: 13px;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
}

.ttac-btn:disabled,
.ttac-mini:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.ttac-btn-muted {
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: #202634;
    color: #ffffff;
}

.ttac-btn-primary {
    background: linear-gradient(135deg, #28cb73, #22b864);
    color: #07150d;
}

.ttac-status {
    min-height: 22px;
    padding: 0 32px 12px;
    color: #98a2b3;
    font-size: 14px;
}

.ttac-status.is-success { color: #67e8a2; }
.ttac-status.is-loading { color: #55c7ff; }
.ttac-status.is-error { color: #ff7373; }

.ttac-table-wrap {
    margin: 0 32px 30px;
    min-height: 220px;
    overflow: auto;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 17px;
    background: rgba(9, 13, 22, 0.72);
}

.ttac-table-wrap::-webkit-scrollbar,
.ttac-reset-result textarea::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

.ttac-table-wrap::-webkit-scrollbar-track,
.ttac-reset-result textarea::-webkit-scrollbar-track {
    background: #0d111b;
    border-radius: 12px;
}

.ttac-table-wrap::-webkit-scrollbar-thumb,
.ttac-reset-result textarea::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #4fc3ff, #7057ff);
    border-radius: 12px;
}

.ttac-table {
    width: 100%;
    min-width: 1160px;
    border-collapse: collapse;
}

.ttac-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 15px 16px;
    text-align: left;
    background: #1a2130;
    color: #bac4d4;
    font-size: 12px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.ttac-table td {
    padding: 15px 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    color: #dfe6ef;
    font-size: 14px;
    vertical-align: middle;
}

.ttac-table tbody tr:hover {
    background: rgba(79, 195, 255, 0.045);
}

.ttac-account-main {
    color: #ffffff;
    font-weight: 900;
    font-size: 15px;
}

.ttac-account-sub {
    max-width: 285px;
    margin-top: 5px;
    color: #7e899b;
    font-size: 11px;
    overflow-wrap: anywhere;
}

.ttac-self {
    display: inline-block;
    margin-top: 7px;
    padding: 4px 7px;
    border-radius: 7px;
    background: rgba(79, 195, 255, 0.14);
    color: #66cbff;
    font-size: 10px;
    font-weight: 900;
}

.ttac-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    min-height: 31px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.5px;
}

.ttac-role-admin { color: #c7a7ff; background: rgba(126, 65, 218, 0.17); border-color: rgba(153, 91, 255, 0.48); }
.ttac-role-private { color: #ffb6d2; background: rgba(219, 50, 119, 0.15); border-color: rgba(255, 86, 157, 0.42); }
.ttac-role-public { color: #8ed8ff; background: rgba(32, 155, 220, 0.15); border-color: rgba(66, 184, 246, 0.42); }
.ttac-role-unknown { color: #aab2c0; background: rgba(148, 163, 184, 0.12); border-color: rgba(148, 163, 184, 0.28); }
.ttac-status-online { color: #6ff0a6; background: rgba(30, 190, 101, 0.13); border-color: rgba(42, 209, 116, 0.46); }
.ttac-status-active { color: #a7f3d0; background: rgba(16, 185, 129, 0.11); border-color: rgba(16, 185, 129, 0.35); }
.ttac-status-inactive { color: #aab2c0; background: rgba(107, 114, 128, 0.13); border-color: rgba(148, 163, 184, 0.25); }

.ttac-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.ttac-mini {
    min-height: 34px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 9px;
    background: #222938;
    color: #ffffff;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.ttac-mini:hover:not(:disabled) {
    border-color: #55c7ff;
}

.ttac-mini-edit {
    border-color: rgba(224, 181, 0, 0.45);
    color: #ffd94f;
}

.ttac-mini-danger {
    border-color: rgba(230, 75, 75, 0.42);
    color: #ff8585;
}

.ttac-empty {
    height: 180px;
    text-align: center !important;
    color: #7e899b !important;
}

.ttac-error {
    color: #ff7373 !important;
}

.ttac-swal-popup {
    width: min(620px, 94vw) !important;
    border: 1px solid rgba(79, 195, 255, 0.3) !important;
    border-radius: 22px !important;
}

.ttac-swal-form {
    display: grid;
    gap: 9px;
    text-align: left;
}

.ttac-swal-form label {
    margin-top: 5px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 800;
}

.ttac-swal-form small {
    color: #7e899b;
    font-size: 11px;
}

.ttac-reset-choice,
.ttac-reset-result {
    display: grid;
    gap: 12px;
    text-align: left;
}

.ttac-choice-btn {
    min-height: 48px;
    border: 1px solid rgba(79, 195, 255, 0.32);
    border-radius: 12px;
    background: #1c2432;
    color: #ffffff;
    padding: 0 16px;
    font-weight: 900;
    cursor: pointer;
}

.ttac-choice-btn:hover {
    background: #263245;
}

.ttac-reset-result textarea {
    width: 100%;
    min-height: 140px;
    box-sizing: border-box;
    resize: vertical;
    border: 1px solid rgba(79, 195, 255, 0.32);
    border-radius: 12px;
    background: #111722;
    color: #e8edf4;
    padding: 12px;
    font-size: 12px;
    line-height: 1.5;
}

@media (max-width: 980px) {
    .ttac-overlay { padding: 10px; }
    .ttac-panel { width: 100%; max-height: 96vh; border-radius: 18px; }
    .ttac-header { padding: 20px; }
    .ttac-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 16px 20px 0; }
    .ttac-toolbar { grid-template-columns: 1fr 1fr; padding: 16px 20px 12px; }
    .ttac-toolbar input { grid-column: 1 / -1; }
    .ttac-status { padding-left: 20px; padding-right: 20px; }
    .ttac-table-wrap { margin: 0 20px 20px; }
}

@media (max-width: 600px) {
    .ttac-header h2 { font-size: 27px; }
    .ttac-header p { font-size: 13px; }
    .ttac-close { width: 44px; height: 44px; flex-basis: 44px; }
    .ttac-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
    .ttac-stats article { min-height: 75px; padding: 13px; }
    .ttac-stats strong { font-size: 24px; }
    .ttac-toolbar { grid-template-columns: 1fr; }
    .ttac-toolbar input { grid-column: auto; }
}

/* V5: biarkan SweetAlert memakai pointer-events bawaannya.
   Jangan membuat container toast transparan menjadi pointer-events: auto. */

/* V5: modal native khusus Tambah Akun, tanpa SweetAlert */
.ttac-native-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(2, 4, 10, 0.82);
    backdrop-filter: blur(10px);
}

.ttac-native-card {
    position: relative;
    z-index: 1;
    isolation: isolate;
    pointer-events: auto !important;
    width: min(620px, 94vw);
    max-height: 92vh;
    overflow: auto;
    border: 1px solid rgba(79, 195, 255, 0.35);
    border-radius: 22px;
    background: #10131e;
    color: #ffffff;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.65);
}

.ttac-native-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 28px 12px;
}

.ttac-native-header h3 {
    margin: 0;
    color: #ffd84d;
    font-size: 28px;
    line-height: 1.15;
}

.ttac-native-close {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    background: #1b202d;
    color: #ffffff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.ttac-native-fields {
    display: grid;
    gap: 10px;
    padding: 14px 28px 8px;
}

.ttac-native-fields label {
    margin-top: 6px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 800;
}

.ttac-native-fields input,
.ttac-native-fields select {
    width: 100%;
    min-height: 52px;
    box-sizing: border-box;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 13px;
    background: #171c28;
    color: #ffffff;
    padding: 0 15px;
    font-size: 15px;
    outline: none;
}

.ttac-native-fields input:focus,
.ttac-native-fields select:focus {
    border-color: #4fc3ff;
    box-shadow: 0 0 0 3px rgba(79, 195, 255, 0.12);
}

.ttac-native-fields small {
    color: #7e899b;
    font-size: 11px;
}

.ttac-native-message {
    min-height: 22px;
    margin-top: 4px;
    color: #98a2b3;
    font-size: 13px;
}

.ttac-native-message.is-loading { color: #55c7ff; }
.ttac-native-message.is-error { color: #ff7373; }

.ttac-native-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 18px 28px 26px;
}

.ttac-native-submit,
.ttac-native-cancel {
    min-width: 128px;
    min-height: 48px;
    border: 0;
    border-radius: 12px;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

.ttac-native-submit {
    background: #2ecc71;
    color: #07150d;
}

.ttac-native-submit:disabled {
    opacity: 0.65;
    cursor: wait;
}

.ttac-native-cancel {
    background: #303544;
    color: #ffffff;
}


/* V5: seluruh kontrol modal harus menerima interaksi. */
.ttac-native-card button,
.ttac-native-card input,
.ttac-native-card select,
.ttac-native-card form {
    pointer-events: auto !important;
}

.ttac-native-submit {
    position: relative;
    z-index: 3;
    touch-action: manipulation;
}

/* Toast SweetAlert transparan tidak boleh menutup tombol modal. */
body.swal2-toast-shown .swal2-container {
    pointer-events: none !important;
}
body.swal2-toast-shown .swal2-popup {
    pointer-events: auto !important;
}

/* =========================================================
   TEMPOTOTO ACCOUNT NOTIFICATION V7
   Native toast, tidak bergantung pada konfigurasi SweetAlert.
   ========================================================= */
.ttac-toast-container {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 2147483647;
    width: min(390px, calc(100vw - 32px));
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.ttac-toast {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 30px;
    align-items: start;
    gap: 12px;
    padding: 15px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(15, 19, 31, 0.98);
    color: #ffffff;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    opacity: 0;
    transform: translateY(-12px) scale(0.98);
    transition: opacity 0.18s ease, transform 0.18s ease;
    pointer-events: auto;
    overflow: hidden;
}

.ttac-toast.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.ttac-toast.is-leaving {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
}

.ttac-toast.is-success { border-color: rgba(46, 204, 113, 0.55); }
.ttac-toast.is-error { border-color: rgba(230, 75, 75, 0.65); }
.ttac-toast.is-warning { border-color: rgba(224, 181, 0, 0.6); }
.ttac-toast.is-loading { border-color: rgba(78, 187, 255, 0.55); }
.ttac-toast.is-info { border-color: rgba(78, 187, 255, 0.4); }

.ttac-toast-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    font-size: 20px;
    font-weight: 900;
    background: rgba(255, 255, 255, 0.07);
}

.ttac-toast.is-success .ttac-toast-icon { color: #37df86; }
.ttac-toast.is-error .ttac-toast-icon { color: #ff6b6b; }
.ttac-toast.is-warning .ttac-toast-icon { color: #ffd54a; }
.ttac-toast.is-loading .ttac-toast-icon,
.ttac-toast.is-info .ttac-toast-icon { color: #65c8ff; }

.ttac-toast-content {
    min-width: 0;
    padding-top: 1px;
}

.ttac-toast-content strong {
    display: block;
    margin: 0 0 4px;
    font-size: 14px;
    line-height: 1.35;
    letter-spacing: 0.01em;
}

.ttac-toast-content p {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 12.5px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.ttac-toast-close {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.65);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.ttac-toast-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.ttac-toast-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(101, 200, 255, 0.22);
    border-top-color: #65c8ff;
    border-radius: 50%;
    animation: ttac-toast-spin 0.75s linear infinite;
}

@keyframes ttac-toast-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
    .ttac-toast-container {
        top: 12px;
        right: 12px;
        width: calc(100vw - 24px);
    }
}
