/**
 * responsive-card-tables (Wave D residual)
 */

/* --- styles.css L3650-L3840 --- */
/* Responsive Card View for Mobile (Max width 768px) */
@media (max-width: 768px) and (hover: none) and (pointer: coarse) {
    .users-table-wrapper {
        border: none;
        box-shadow: none;
        background: transparent;
        max-height: none;
        overflow: visible;
    }

    /* Target specific tables for Card View transformation */
    #super-users-table.data-table,
    #super-users-table tbody,
    #super-users-table tr,
    #super-users-table td {
        display: block;
        width: 100%;
    }

    #super-users-table thead {
        display: none; /* Hide header */
    }

    #super-users-table {
        min-width: 0;
    }

    #super-users-table tbody tr {
        background: var(--bg-card);
        margin-bottom: 16px;
        border-radius: 12px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        border: 1px solid var(--border-color);
        padding: 16px;
    }

    #super-users-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px solid #eee;
        text-align: right;
    }

    #super-users-table td:last-child {
        border-bottom: none;
        justify-content: flex-end;
        gap: 8px;
        padding-top: 16px;
    }

    /* Add Labels via CSS */
    #super-users-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--secondary-color);
        text-align: left;
        margin-right: 16px;
    }

    /* Specific labels for Users Table */
    #super-users-table td:nth-of-type(1)::before { content: "Nama"; }
    #super-users-table td:nth-of-type(2)::before { content: "Email"; }
    #super-users-table td:nth-of-type(3)::before { content: "HP"; }
    #super-users-table td:nth-of-type(4)::before { content: "NIK"; }
    #super-users-table td:nth-of-type(5)::before { content: "Role"; }
    #super-users-table td:nth-of-type(6)::before { content: "Perusahaan"; }
    #super-users-table td:nth-of-type(7)::before { content: "Posisi"; }
    #super-users-table td:nth-of-type(8)::before { content: ""; display: none; } /* No label for actions */
}

/* Action Buttons in Table */
.action-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    margin-right: 4px;
    transition: all 0.2s ease;
}

.action-btn.edit {
    background-color: var(--primary-color);
    color: white;
}

.action-btn.edit:hover {
    background-color: var(--primary-hover);
    color: var(--text-on-brand, #ffffff);
}

.action-btn.delete {
    background-color: #d9534f;
    color: white;
}

.action-btn.delete:hover {
    background-color: #c9302c;
    color: #ffffff;
}

/* Pagination */
.pagination-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: calc(var(--spacing-unit) * 1);
    margin-top: calc(var(--spacing-unit) * 2);
    flex-wrap: wrap;
    padding: calc(var(--spacing-unit) * 1.5);
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
}

.page-btn {
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 4px;
}

.page-numbers button {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.page-numbers button:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-numbers button.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: 600;
}

.page-info {
    font-size: 14px;
    color: var(--text-secondary); /* WCAG AA: Use variable instead of #666 */
    margin-left: calc(var(--spacing-unit) * 2);
}

.page-info input {
    width: 60px;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-align: center;
    font-size: 14px;
}

/* Role Badge Colors - Removed (Moved to Data Table section) */

/* loading-skeleton (L4218-L4469) → styles/components/loading-skeleton.css */

/* riwayat-summary (L4220-L4796) → styles/modules/riwayat-summary.css */

/* loading-skeleton (L5047-L5306) → styles/components/loading-skeleton.css */

/* shell-responsive (L4799-L5129) → styles/modules/shell-responsive.css */

